Getting content of a script file using Javascript

前端 未结 8 1200
谎友^
谎友^ 2021-02-07 19:38

I have the following script element in my web page:


Using JavaScript,

8条回答
  •  我在风中等你
    2021-02-07 19:50

    I think what you want to do is to assign a variable inside template.js. Then you have the variable available for use wherever you want in jquery. Something like:

    var tpl = "
    ...
    "

    Wouldn't this be a simpler solution to your problem? We do this in Ext JS. I think this will work for you in jQuery.

提交回复
热议问题