javascript code not work in HEAD tag

后端 未结 6 1482
有刺的猬
有刺的猬 2020-11-29 13:18

My webpage has the following code:



    This is test Page

     

        
6条回答
  •  没有蜡笔的小新
    2020-11-29 14:05

    Michael Geary is right, in order to execute your code, I'd use jQuery library (a de-facto standard in JS development) and utilize the DOM ready event. This will ensure the code in the handler will execute once DOM is fully loaded.

    
    

提交回复
热议问题