时间:2020-02-01加入收藏
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>time</title>
<script>
var t1 = new Date().getTime();
</script>
<script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
</head>
<body style="background-color: #363636;color: aqua; font-size: 12px;line-height: 20px">
<div id="v">加载中</div>
<script>
window.onload = function()
{
var t2=new Date().getTime();
var c=15//测试页损失毫秒数
var t3=t2-t1-c;
document.getElementById("v").innerHTML=" 速度:"+t3+"ms";
}
</script>
</body>
</html>
TGA: 技巧