How to link external javascript file onclick of button

前端 未结 8 1175
旧时难觅i
旧时难觅i 2020-11-29 20:22

The javascript file is there in Public/Scripts/filename.js. I have a template file in template/form.tmpl.html. Root folder contains Public and template folders

I wo

8条回答
  •  生来不讨喜
    2020-11-29 21:08

    It is totally possible, i did something similar based on the example of Mike Sav. That's the html page and ther shoul be an external test.js file in the same folder

    example.html:

    
    
    
    
    

    test.js:

    alert('hello world')
    

提交回复
热议问题