วันที่.
วิธีนี้ไม่รองรับใน IE6/7/8 และสามารถแก้ไขได้ดังนี้
การคัดลอกรหัสมีดังนี้:
if (! date.prototype.toisostring) {
date.prototype.toisostring = function () {
Function Pad (n) {return n <10? '0' + n: n}
return this.getUtClyEar () + '-'
+ pad (this.getutcmonth () + 1) + '-'
+ pad (this.getutcdate ()) + 't'
+ pad (this.getUtchours ()) + ':'
+ pad (this.getutcminutes ()) + ':'
+ pad (this.getutcseconds ()) + '.'. '
+ pad (this.getutcmilliseconds ()) + 'z';
-
-
ที่เกี่ยวข้อง:
http://msdn.microsoft.com/zh-cn/library/ie/ff925953%28v=vs.94%29.aspx
https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/date