@StrGlee
2018-08-08T22:22:19.000000Z
字数 780
阅读 1063
在此输入正文
<head>
<meta charset=utf-8 />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>军职在线</title>
</head>
<script>
var userAgent = navigator.userAgent;
var _isAndroid = !!userAgent.match(/android/ig);
var _isIos = !!userAgent.match(/iphone|ipad|ipod/ig);
var _isIpad = !!userAgent.match(/ipad/ig);
var _isIDevicePhone = (/iphone|ipod/gi).test(navigator.platform);
var _isIDeviceIpad = !_isIDevicePhone && (/ipad/gi).test(navigator.platform);
var _isIDevice = _isIDevicePhone || _isIDeviceIpad;
var _isWeixin = !!userAgent.match(/micromessenger/ig)
var _isMiniProgram == _isAndroid && _isWeixin && !!userAgent.match(/miniprogram/ig)
if(_isIos || _isAndroid || _isIDevice || _isWeixin || _isMiniProgram){
// 移动端
}
</script>