How to call a JavaScript function within an HTML body

后端 未结 4 664
我在风中等你
我在风中等你 2020-12-08 18:41

I have a JavaScript function that fills a table:



        
4条回答
  •  离开以前
    2020-12-08 19:10

    First include the file in head tag of html , then call the function in script tags under body tags e.g.

    Js file function to be called

    function tryMe(arg) {
        document.write(arg);
    }
    

    HTML FILE

    
    
    
        
        abc
    
    
        
    
    
    

    finish

提交回复
热议问题