2010-04-11 79 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