Firebug: “The 'charCode' property of a keyup event should not be used. The value is meaningless.”

前端 未结 3 1271
故里飘歌
故里飘歌 2021-01-21 10:06

I\'m building a calculator, and am using the following:

jQuery(function($) {
    $(\'#Quantity\').keyup(function() {
        console.log($(this).val());
    });
         


        
3条回答
  •  旧巷少年郎
    2021-01-21 10:50

    1) Yes, you are using the right event with keyup, so you get the latest value.

    2) You can safely ignore this Firebug warning, it appears in many, many applications and is a result of how jQuery normalizes the .which property for events, firebug should be a bit smarter about this IMO.

提交回复
热议问题