How to add onload event to a div element

前端 未结 24 2246
谎友^
谎友^ 2020-11-22 00:26

How do you add an onload event to an element?

Can I use:

for t

24条回答
  •  借酒劲吻你
    2020-11-22 01:01

    I just want to add here that if any one want to call a function on load event of div & you don't want to use jQuery(due to conflict as in my case) then simply call a function after all the html code or any other code you have written including the function code and simply call a function .

    /* All Other Code*/
    -----
    ------
    /* ----At the end ---- */
    
    

    OR

    /* All Other Code*/
    -----
    ------
    /* ----At the end ---- */
    
    

提交回复
热议问题