<span id="totalSecond">5</span>秒后跳转到新域名下面 <script> var totalSecond = document.getElementById('totalSecond'); var second = totalSecond.innerHTML; setInterval("redirect()", 1000); function redirect(){ totalSecond.innerHTML=--second; if(second<0) location.href='http://www.'; } </script>