I have onKeypress Event in Text Box This Works in FireFox, does not in IE
event is passed as undefined in IE
PriceInBox.onkeypress = function(event) { return moZoltarCurrent.evt_checkForInt(event); }
I have onKeypress Event in Text Box This Works in FireFox, does not in IE
event is passed as undefined in IE
PriceInBox.onkeypress = function(event) { return moZoltarCurrent.evt_checkForInt(event); }
Share
Improve this question
edited Sep 22, 2010 at 23:55
Marcel Korpel
21.8k6 gold badges62 silver badges80 bronze badges
asked Sep 22, 2010 at 23:50
PraveenPraveen
591 silver badge2 bronze badges
1 Answer
Reset to default 7You need to normalize the Event interface, as IE doesn't pass it along as a parameter, but uses a global variable:
PriceInBox.onkeypress = function(event) {
event = event || window.event;
return moZoltarCurrent.evt_checkForInt(event);
};
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742344845a4426341.html
评论列表(0条)