Best way to remove an event handler in jQuery?

前端 未结 20 2664
庸人自扰
庸人自扰 2020-11-21 11:38

I have an input type=\"image\". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image

20条回答
  •  无人及你
    2020-11-21 12:04

    if you set the onclick via html you need to removeAttr ($(this).removeAttr('onclick'))

    if you set it via jquery (as the after the first click in my examples above) then you need to unbind($(this).unbind('click'))

提交回复
热议问题