Best way to remove an event handler in jQuery?

前端 未结 20 2372
庸人自扰
庸人自扰 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 11:51

    I had to set the event to null using the prop and the attr. I couldn't do it with one or the other. I also could not get .unbind to work. I am working on a TD element.

    .prop("onclick", null).attr("onclick", null)
    

提交回复
热议问题