JS checks whether the mobile phone or pad access is implemented.
JS checks whether mobile phone or pad access is implemented
S determines whether the mobile phone or pad access content. If you are interested in using JS to determine whether the mobile phone or pad access is used, you can check it,
Directly run the Code:
<Script type = "text/javascript">/** smartphone browser version: **/var browser = {versions: function () {var u = navigator. userAgent, app = navigator. appVersion; return {// mobile terminal browser version information trident: u. indexOf ('think')>-1, // IE kernel presto: u. indexOf ('presto ')>-1, // opera kernel webKit: u. indexOf ('applewebkit ')>-1, // Apple, Google kernel gecko: u. indexOf ('gecko ')>-1 & u. indexOf ('khtml ') =-1, // Firefox kernel mobile :!! U. match (/AppleWebKit. * Mobile. */) | u. indexOf ('ipad ')>-1, // whether it is a Mobile terminal ios :!! U. match (/\ (I [^;] +; (U ;)? CPU. + Mac OS X/), // ios terminal android: u. indexOf ('android')>-1 | u. indexOf ('linux ')>-1, // android terminal or uc browser iPhone: u. indexOf ('iphone ')>-1, // whether the browser is iPhone or QQHD iPad: u. indexOf ('ipad ')>-1, // whether iPad webApp: u. indexOf ('safari ') =-1 // whether the web should program, no header and bottom};} (), language :( navigator. browserLanguage | navigator. language ). toLowerCase ()} document. writeln ("language version:" + browser. language + "<br/>"); document. writeln ("whether it is a mobile terminal:" + browser. versions. mobile + "<br/>"); document. writeln ("ios terminal:" + browser. versions. ios + "<br/>"); document. writeln ("android terminal:" + browser. versions. android + "<br/>"); document. writeln ("iPhone:" + browser. versions. iPhone + "<br/>"); document. writeln ("iPad:" + browser. versions. iPad + "<br/>"); document. writeln (navigator. userAgent); </script>
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!