jquery charcode error
i have this simple form validation in jquery:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
<script type="text/javascript">
window.onload = (function(){
$("#register_form").validate({
rules: {
usernam开发者_如何学Goe: {
required: true,
minLength: 3
},
password: {
required: true,
minLegth: 3
},
password_2: {
equalTo: "#password",
}
}
});
});
</script>
If I digit a char in username I have this error in firefox javascript console (ver. 3.6.3):
"The 'charCode' property of a keyup event should not be used. The value is meaningless."
Is there any way to fix it?
Personally, I've always ignored this error...it's a result of jQuery normalizing the event (and assigning what you need to event.which
), it causes no harm, and only Firebug seems to care.
精彩评论