jQuery: textbox keyup firing twice

前端 未结 8 1921
南笙
南笙 2021-01-11 16:09

I\'m having a textbox and assigned the following function (it\'s the only function assigned):

txt.bind(\"keyup\",function(event){
    if(event.keyCode==13)
          


        
8条回答
  •  暖寄归人
    2021-01-11 16:40

    i found out by myself - txt.bind was assigned twice to the textbox so it fired twice. is this a bug? i thought binding a function will always fire just once .. hmm

提交回复
热议问题