js 判断是不是手机访问 方法一: if(window.navigator.userAgent.toLowerCase().indexOf('mobile')==-1) { alert("pc端") } else{ alert("我是手机访问") }