/**判断移动端,控制导航的样式**/
if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE|RIM|Windows Phone|Nexus|Nokia/.test(navigator.userAgent))){
if(window.location.href.indexOf("?mobile")<0){
try{
if(/Android|webOS|iPhone|iPod|BlackBerry|RIM|Windows Phone|Nexus|Nokia/i.test(navigator.userAgent)){
loadCSS("css/website/style.mobile.css");
}else if(/iPad/i.test(navigator.userAgent)){
loadCSS("css/website/style.mobile.css");
}else{
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var startTime = (new Date).getTime(), //进入页面时间 | |
interval = 0, //进入页面到现在间隔了多少秒 | |
clock; | |
//每500毫秒计算一次,这里你自己修改 | |
clock = setInterval(function () { | |
interval = Math.ceil(((new Date).getTime() - startTime) / 1000); | |
if (interval > 2) { //这里是2秒判断 | |
clearInterval(clock); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |