如何计算页面的返回时间
转载:http://dev.mjxy.cn/a-How-to-calculate-the-return-time-of-the-page.aspx
服务器端开始计时:
ViewData["result"] = DateTime.Now.TimeOfDay.TotalMilliseconds;
页面最后调用脚本计算
<span id="times" title="<%:ViewData["result"]%>"><%:ViewData["result"]%></span>
<script type="text/javascript">
$(document).ready(function () {
var today;
today = new Date();
var end = $("#times").attr("title");
alert((today.getMilliseconds()-end)/1000);
});