日期:2014-05-16  浏览次数:20415 次

集中导入脚本的方法?
一个Jsp文件中导入的脚本
<script   type= "text/javascript "   src= "A.js "> </script>
<script   type= "text/javascript "   src= "B.js "> </script>
<script   type= "text/javascript "   src= "C.js "> </script>
<script   type= "text/javascript "   src= "D.js "> </script>
<script   type= "text/javascript "   src= "E.js "> </script>
<script   type= "text/javascript "   src= "F.js "> </script>

有没有什么方法可以导入一个脚本文件,这个文件在导入N个文件

eg.假设

Jsp
<script   type= "text/javascript "   src= "Root.js "> </script>

Root.js
<script   type= "text/javascript "   src= "A.js "> </script>
<script   type= "text/javascript "   src= "B.js "> </script>
<script   type= "text/javascript "   src= "C.js "> </script>
<script   type= "text/javascript "   src= "D.js "> </script>
<script   type= "text/javascript "   src= "E.js "> </script>
<script   type= "text/javascript "   src= "F.js "> </script>

这种写法可以么?好象prototype函数库prototype.js对其他子脚本的导入就是集中的方式,好象用到了一条语句   !import........

------解决方案--------------------
http://www.csdn.net/ui/adrotate.htm

jsframework