日期:2014-05-18  浏览次数:20505 次

如何得到客户端时间
同题

------解决方案--------------------
now = new Date();
var s = now.getHours()+now.getMinutes()+now.getSeconds();

------解决方案--------------------
在服务器端的btn上加事件函数
GetDateBtn.Attributes.Add( "onclick ", "return getdate(); ");

客户端getdate()取客户端时间放进一个隐藏控件里
now = new Date();
var s = now.getHours()+now.getMinutes()+now.getSeconds();
document.all[hiddenText].value = s;

服务器端btn函数去取的时候只要取hiddenText的值就行了
------解决方案--------------------
恩,是的