判断pc 端环视 移动端

<script type="text/javascript">
if(navigator.userAgent.indexOf('Mobile') != -1){
console.log("app");
}else{
window.location.href="web_download.html";
console.log("web");

}

原文地址:https://www.cnblogs.com/fnncat/p/5726534.html