How to call a javaScript Function in jsp on page load without using <body onload=“disableView()”>

前端 未结 1 496
日久生厌
日久生厌 2021-02-14 08:36

How can a JavaScript function in JSP be called during page load without using


I have to call this functio

1条回答
  •  别跟我提以往
    2021-02-14 08:52

    Either use window.onload this way

    
    

    or alternatively

    
    

    (yes, without the parentheses)


    Or just put the script at the very bottom of page, right before . At that point, all HTML DOM elements are ready to be accessed by document functions.

    
        ...
    
        
    
    

    0 讨论(0)
提交回复
热议问题