var system = { win: false, mac: false, xll: false }; // 检测各设备 var pf = navigator.platform; system.win = pf.indexOf("Win") == 0; system.mac = p.indexOf("Mac") == 0; system.xll = (pf == "X11") || (pf.indexOf("Linux") == 0); if (system.win || system.mac || system.xll) { return; } else { //连接到手机端 }