How to link external javascript file onclick of button

前端 未结 8 1143
旧时难觅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:09

    You can load all your scripts in the head tag, and whatever your script is doing in function braces. But make sure you change the scope of the variables if you are using those variables outside the script.

    0 讨论(0)
  • 2020-11-29 21:09

    Adding dynamic script to head You can write function and add an script element with src of js file path

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