简体   繁体   中英

Detect browsers that AREN'T mobile?

I'm using the javascript from http://detectmobilebrowsers.com/ to see check if a browser is mobile and then use a different version of my website.

However I'd also ideally like the site to revert to desktop if a browser isn't one of the mobile ones.

I don't wanna post the whole thing because it's quite long but the function goes like this:

(function(a,b){if(/...'http://detectmobilebrowser.com/mobile');

So basically, I want 'if' to instead have a role of 'if not'. How can I accomplish this?

在JavaScript聊天中大喊@JennaSloan-答案是使用以下方法:

if(!( or if(false==(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM