赞
踩
方法一:
if ( window.screen.width>=768 ){
console.log('电脑')
} else{
console.log('手机')
}
方法二:
var system = {};
system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
if ( system.pingtai ) {
console.log('电脑')
} else {
console.log('电脑')
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。