2010-04-11 65 views

回答

1

请检查下面的代码:通过日期值接受

<script language="javascript"> 
ourDate = new Date(); 
document.write("The time and date at your computer's location is: " 
+ ourDate.toLocaleString() 
+ ".<br/>"); 
document.write("The time zone offset between local time and GMT is " 
+ ourDate.getTimezoneOffset() 
+ " minutes.<br/>"); 
document.write("The time and date (GMT) is: " 
+ ourDate.toGMTString() 
+ ".<br/>"); 
</script> 

HTH

+0

javascript日期格式从C#返回? 如果我打印都有确切的价值。 示例 JavaScript函数fx()比较从C#返回的具有相同格式的值 – 2010-04-13 11:22:52