In this fiddle, the values for
new Date(val[0]).getTime()
differ in Chrome and IE.
The chrome values appear to be proper, Is there a workaround to get the values correct in IE.
Code:
$(function () {
var text="";
$.each($.parseJSON("[{"name":"critical","data":[["2013-10-01T00:00:00",830],["2013-10-02T00:00:00",257],["2013-10-03T00:00:00",160],["2013-10-04T00:00:00",200]]},{"name":"normal","data":[["2013-10-01T00:00:00",24],["2013-10-02T00:00:00",20],["2013-10-03T00:00:00",13],["2013-10-04T00:00:00",30]]},{"name":"ignore","data":[["2013-10-01T00:00:00",1732],["2013-10-02T00:00:00",1220],["2013-10-03T00:00:00",1120],["2013-10-04T00:00:00",1500]]}]"), function (key, value) {
$.each(value.data, function (key, val) {
text += "["+(new Date(val[0]).getTime()).toString()+","+ val[1].toString()+"]";
});
}
);
$("#container").html(text);
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…