I.E - keypress happen all the time - jquery
i have a problem 开发者_如何转开发with ie, like always.
check this demo with IE9 or 8: DEMO
go inside the input and hit the enter, i dont know why the alert will apear.
bug ?
// the button
$("#client").live("click", function(){
alert('test');
});
// the input text
$("#pesq_model").live("keypress", function(e){
// testing with nothing
});
IE treats button
tags in a special way. You could use an input instead of a button:
<input type="button" style="border: solid #dedede 2px; width:130px;" id="client" value="Trocar Cliente" />
Demo.
You should use $('#form_id').live("submit", {...})
instead, I think.
http://jsfiddle.net/C5Jzw/4/
$("#form_id").live("submit", function() {
alert('teste');
});
精彩评论