ctv.currentdate = new Date(ctv["current"]["@attributes"].attr);
页面在 Chrome 中就像一个魅力,但 Firefox、IE10 和 Safari 都不起作用。Firefox 控制台返回以下消息:
TypeError: ctv.current['@attributes'] is undefined
如果我这样做console.log(ctv["current"]["@attributes"]);
,Firefox 会返回undefined
,而 Chrome 会返回一个实际值,即。Object {attr: "2013-7-28"}
.
想法?