js判断移动端PC端(正则表达式) if (!/windows phone|iphone|android/ig.test(window.navigator.userAgent)) { //pc }else{ //h5 }