how to change onclick event with jquery?

后端 未结 7 1100
梦毁少年i
梦毁少年i 2020-12-08 09:01

I have create a js file in which i am creating the dynamic table and dynamically changing the click event for the calendar but onclicking the calender image for dynamic gene

7条回答
  •  醉梦人生
    2020-12-08 09:21

    @Amirali

    console.log(document.getElementById("SAVE_FOOTER"));
    document.getElementById("SAVE_FOOTER").attribute("onclick","console.log('c')");
    

    throws:

    Uncaught TypeError: document.getElementById(...).attribute is not a function
    

    in chrome.

    Element exists and is dumped in console;

提交回复
热议问题