logo
Search
showing results for - "navigator on mobile javascript"
Nicola
28 Feb 2016
1if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
2  // true for mobile device
3  document.write("mobile device");
4}else{
5  // false for not mobile device
6  document.write("not mobile device");
7}
8
source
similar questions
js dom for mobilejavascript detect mobile browsernavigation prompt javascriptjs detect mobiledetect mobile javascriptall navigator cpu option in javascriptjavascript detect mobile or desktopjavascript detect mobile browserbest way to detect mobile device jqueryjavascript detect touch screen devicejavascript detect mobile devicejavascript get devicejs if mobile browser
queries leading to this page
check if user is on mobile device javascriptjs detect if user is on mobile or desktophow to detect if the user is on mobile or pc jshow to find out if the user is on mobile or pc in js 3fhow to check whether user is on desktop or mobile in javascripthow to check if user is on mobile or desktop javascriptnavigator on mobile javascript
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue