date.prototype.toisoString 방법은 다음과 같이 ES3 문서가 아닌 ES5에 추가되었습니다.
이 방법은 IE6/7/8에서 지원되지 않으며 다음과 같이 수정할 수 있습니다.
코드 사본은 다음과 같습니다.
if (! date.prototype.toisoString) {
date.prototype.toisoString = function () {
기능 패드 (n) {return n <10? '0' + n : n}
returetclyear () + '-'를 반환하십시오.
+ PAD (this.getUtCmonth () + 1) + '-'-'
+ PAD (this.getUtcDate ()) + 't'
+ PAD (this.getCHOURS ()) + ':'
+ 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