1、在head中加入以下代码: var beginTime = new Date().getTime(); 2、在页面结尾加入以下代码: window.onload = function(){ document.getElementById