SOURCE

console 命令行工具 X clear

                    
>
console
var duration = 9900;
var endTime = new Date().getTime() + duration + 100;
function interval() {
  var n = (endTime - new Date().getTime()) / 1000;
  if (n < 0) return;
  document.getElementById("timeout").innerHTML = n.toFixed(1).toString().replace(/\d+./, '');
  setTimeout(interval, 10);
}
window.onload = function() {
  setTimeout("window.location.href='http://www.baidu.com'", duration);
  interval();
}
<span id="timeout">
</span>