Pass variable to external JS file?

前端 未结 4 1790
遇见更好的自我
遇见更好的自我 2020-12-19 04:28

Is it possible to pass a variable to a linked .js file? I tried this:



        
4条回答
  •  一个人的身影
    2020-12-19 05:03

    No, but you can pass a the value directly to a function in that file or set a variable value that will be used in the external file.

提交回复
热议问题