常常用来设置跳转页面的功能 document.write("三秒之后跳转到百度首页了哦") setTimeout(function () { location.href = "http://www.baidu.com" },3000)