这是我目前的情况,我想更改.live但.on无法正常工作。
$('#SearchString').live('keydown',function(e) {
if (e.which == 13) {
if (!$("#SearchString").val()) {
alert("Inget postnummer eller ort angiven!");
return false;
}
}
});
$('#SearchString').on('keydown',function(e) {
if (e.which == 13) {
if (!$("#SearchString").val()) {
alert("Inget postnummer eller ort angiven!");
return false;
}
}
});
这是ON版本
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句