等待<span id="daojishi">10</span>秒后你将跳转到http://www.baidu.com <script type="text/javascript"> function daoshu(){ var djs = document.getElementById("daojishi"); if(djs.innerHTML == 0){ window.location.href='http://www.baidu.com'; return false; } djs.innerHTML = djs.innerHTML - 1; } window.setInterval("daoshu()", 1000); </script>