how to identity device model with javascript [duplicate]
This question already has an answer here:
Detecting iOS / Android Operating system
8 answers
In My WebSite when User click on picture,if the user device model was android,go to android download page and if the user device model was Ios,go to Ios download page.and if user use "PC" go to another page.
how can i do it with Javascript??
javascript
marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 14 '18 at 7:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Detecting iOS / Android Operating system
8 answers
In My WebSite when User click on picture,if the user device model was android,go to android download page and if the user device model was Ios,go to Ios download page.and if user use "PC" go to another page.
how can i do it with Javascript??
javascript
marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 14 '18 at 7:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18
add a comment |
This question already has an answer here:
Detecting iOS / Android Operating system
8 answers
In My WebSite when User click on picture,if the user device model was android,go to android download page and if the user device model was Ios,go to Ios download page.and if user use "PC" go to another page.
how can i do it with Javascript??
javascript
This question already has an answer here:
Detecting iOS / Android Operating system
8 answers
In My WebSite when User click on picture,if the user device model was android,go to android download page and if the user device model was Ios,go to Ios download page.and if user use "PC" go to another page.
how can i do it with Javascript??
This question already has an answer here:
Detecting iOS / Android Operating system
8 answers
javascript
javascript
edited Nov 14 '18 at 7:17
Zohreh Zamani
asked Nov 14 '18 at 6:56
Zohreh ZamaniZohreh Zamani
44
44
marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 14 '18 at 7:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 14 '18 at 7:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18
add a comment |
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18
add a comment |
1 Answer
1
active
oldest
votes
You can detect browser user agents for this purpose. It simply does not check the phone model but checks user agents that the mobile is using to connect. Please check below page. You can find scripts that are written in many languages and also Javascript.
http://detectmobilebrowsers.com/
Also the script initially contains many keywords to detect all major devices. You can simply modify it to meet your objective as below to check only iOS, Android, PC and other mobile devices separately.
(function(a, b) p)(navigator.userAgent || navigator.vendor || window.opera, 'http://stackoverflow.com');
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can detect browser user agents for this purpose. It simply does not check the phone model but checks user agents that the mobile is using to connect. Please check below page. You can find scripts that are written in many languages and also Javascript.
http://detectmobilebrowsers.com/
Also the script initially contains many keywords to detect all major devices. You can simply modify it to meet your objective as below to check only iOS, Android, PC and other mobile devices separately.
(function(a, b) p)(navigator.userAgent || navigator.vendor || window.opera, 'http://stackoverflow.com');
add a comment |
You can detect browser user agents for this purpose. It simply does not check the phone model but checks user agents that the mobile is using to connect. Please check below page. You can find scripts that are written in many languages and also Javascript.
http://detectmobilebrowsers.com/
Also the script initially contains many keywords to detect all major devices. You can simply modify it to meet your objective as below to check only iOS, Android, PC and other mobile devices separately.
(function(a, b) p)(navigator.userAgent || navigator.vendor || window.opera, 'http://stackoverflow.com');
add a comment |
You can detect browser user agents for this purpose. It simply does not check the phone model but checks user agents that the mobile is using to connect. Please check below page. You can find scripts that are written in many languages and also Javascript.
http://detectmobilebrowsers.com/
Also the script initially contains many keywords to detect all major devices. You can simply modify it to meet your objective as below to check only iOS, Android, PC and other mobile devices separately.
(function(a, b) p)(navigator.userAgent || navigator.vendor || window.opera, 'http://stackoverflow.com');
You can detect browser user agents for this purpose. It simply does not check the phone model but checks user agents that the mobile is using to connect. Please check below page. You can find scripts that are written in many languages and also Javascript.
http://detectmobilebrowsers.com/
Also the script initially contains many keywords to detect all major devices. You can simply modify it to meet your objective as below to check only iOS, Android, PC and other mobile devices separately.
(function(a, b) p)(navigator.userAgent || navigator.vendor || window.opera, 'http://stackoverflow.com');
answered Nov 14 '18 at 7:43
Erdem SavasciErdem Savasci
1436
1436
add a comment |
add a comment |
u can use user agent developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
– Jibin Mathews
Nov 14 '18 at 7:01
no!! I Just want get user device model with javascript!!
– Zohreh Zamani
Nov 14 '18 at 7:09
my comment was based on "i want if the user device model was android,after click on picture go to android download page and if the user device model was Ios,it go to Ios download page.and if user use "Pc" it go to another page."
– Jibin Mathews
Nov 14 '18 at 7:10
I Edit My Question.Thank You Dear..
– Zohreh Zamani
Nov 14 '18 at 7:18