<!doctype html>
<meta charset= "Utf-8";
<title> Determine if mobile access is-jq22.com</title>
<script src= "Http://libs.baidu.com/jquery/1.11.3/jquery.min.js" ></ Script>
<style>
</style>
<body>
<p><label> JS judgment Result: </label><span id= "Rs_js" class= "Red" ></SPAN></P><SCRIPT>
if (/AppleWebKit . *mobile/i.test (navigator.useragent) | | /android/i.test (navigator.useragent) | | /blackberry/i.test (navigator.useragent) | | /iemobile/i.test (navigator.useragent) | | (/midp| symbianos| nokia| Samsung| Lg| nec| tcl| alcatel| bird| dbtel| dopod| philips| haier| lenovo| mot-| nokia| sonyericsson| sie-| amoi| Zte/.test (navigator.useragent)) {
if (/ipad/i.test (navigator.useragent)) {
$ ("#rs_js"). Text ("IPad tablet");
} else {
$ ("#rs_js"). Text ("mobile phone");
}
} else {
$ ("#rs_js"). Text ("Computer");
}</script>
</body>
Determine if mobile access is available