Pra*_*een 6 javascript internet-explorer
我在文本框中有onKeypress事件这在FireFox中有效,不在IE中
事件在IE中作为未定义传递
PriceInBox.onkeypress = function(event) { return moZoltarCurrent.evt_checkForInt(event); }
Run Code Online (Sandbox Code Playgroud)
您需要规范化Event接口,因为IE 不会将其作为参数传递,而是使用全局变量:
PriceInBox.onkeypress = function(event) {
event = event || window.event;
return moZoltarCurrent.evt_checkForInt(event);
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4317 次 |
| 最近记录: |