简体   繁体   English

从ano动态将javascript文件包含在jsp中

[英]Include javascript file in jsp from anothe javascript file dynamically

Is it possible to include a javascript files in jsp dynamiacalyy, ie. 是否有可能在jsp dynamiacalyy中包含一个javascript文件,即。 in any listener or anything like that from the current javascript file. 在任何侦听器中或当前javascript文件中的任何类似内容中。 This is for speeding up the page load. 这是为了加快页面加载速度。

Yes, there are multiple options, for example jQuery has $.getScript method. 是的,有多个选项,例如jQuery具有$ .getScript方法。 Or you can use http://requirejs.org/ 或者您可以使用http://requirejs.org/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM