how to identity device model with javascript [duplicate]










-3
















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??










share|improve this question















marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze javascript
Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

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















-3
















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??










share|improve this question















marked as duplicate by John Dvorak, Agnius Vasiliauskas, Teemu, deceze javascript
Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

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













-3












-3








-3


1







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??










share|improve this question

















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 javascript
Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

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 javascript
Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

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

















  • 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












1 Answer
1






active

oldest

votes


















0














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');





share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    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');





    share|improve this answer



























      0














      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');





      share|improve this answer

























        0












        0








        0







        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');





        share|improve this answer













        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');






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 7:43









        Erdem SavasciErdem Savasci

        1436




        1436















            Popular posts from this blog

            Darth Vader #20

            How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

            Ondo