1
window.onload = function () {
  new JsDatePick({
    useMode: 2,
    target: "prod_war",
    dateFormat: "%Y-%m-%d",
  });
  showResult('SHOW', '', '');
};

上述功能无法onload在 Internet Explorer中执行

4

1 回答 1

6

删除“额外”逗号:

window.onload = function () {
  new JsDatePick({
    useMode: 2,
    target: "prod_war",
    dateFormat: "%Y-%m-%d" // comma removed from here
  });
  showResult('SHOW', '', '');
};

IE 抱怨这一点 - 其他浏览器倾向于忽略它

于 2012-06-19T10:47:09.260 回答