我想弄清楚为什么Date.parse(JavaScript)返回NaN时应用于看似有效的ISO 8601日期字符串,当IE9处于怪癖模式。它在标准模式下工作正常。在IE9怪癖模式Date.parse返回NaN
//ReturnsNaN in Quirks Mode, 1270574382557 in Standards Mode
document.write(Date.parse("2010-04-06T17:19:42.557"));
//Returns NaN in Quirks Mode, 1270512000000 in Standards Mode
document.write(Date.parse("2010-04-06"));
与此相反,在这两个怪癖和标准我
//Returns 1270549182000 in both Quirks and Standards Modes
document.write(Date.parse("2010/04/06T17:19:42"));
是任何人看到这种行为下的作品?如果是这样,关于为什么Date.parse返回NaN的任何想法?
也许这会有所帮助,也许不会:[两个类似Date.parse的情况返回不同的结果。](http://stackoverflow.com/questions/2587345/javascript-date-parse) – sdleihssirhc