iOS Chrome detection

后端 未结 4 1492
情书的邮戳
情书的邮戳 2020-12-23 16:33

I use Javascript code

if( (Android|webOS|iPhone|iPad|iPod|BlackBerry).test(navigator.userAgent) ) {}

for mobile device detection, but Chrom

4条回答
  •  时光说笑
    2020-12-23 16:58

    Perhaps, you could try:

    var os = navigator.platform;
    

    Then handle the os variable accordingly for your result.

    You can also loop through each object of the navigator object to help get you more familiarized with the objects:

    
    

    As found in this anwser: jQuery/Javascript to detect OS without a plugin?

提交回复
热议问题