Ways to add javascript files dynamically in a page

后端 未结 9 1645
盖世英雄少女心
盖世英雄少女心 2020-11-28 09:16

I have seen Scriptaculous.js file to include its required javascript files dynamically. Is there any better approach to include javascript dynamically.

For example,

9条回答
  •  生来不讨喜
    2020-11-28 09:49

    You can use the jQuery.getScript() function... I think it will be much easier to you with this to include a JavaScript .js file.

    Here is the reference.

提交回复
热议问题