第一种代码:EXFCODE:1 function isChinese(temp)2 {3 var re=/[^/u4e00-/u9fa5]/;4 if (re.test(temp)) return false ;5 return true ;6 } 第二种代码:EXFCODE:01 function isChn(str)02 {03 var reg=/^[/u4E00-/u9FA5]+$/;04 …
<scripttype="text/javascript"> function browserRedirect() { var sUserAgent= navigator.userAgent.toLowerCase(); var bIsIpad= sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os&q…
方法一: var isPC = function () { var userAgentInfo = navigator.userAgent.toLowerCase(); var Agents = new Array("android", "iphone", "symbianOS", "windows phone", "ipad", "ipod"); var flag = true; fo…