以下链接http://developer.yahoo.com/performance/rules.html#js_bottom说“将脚本放在底部”以加速您的网站。可以说我已将它们添加到底部
<html>
<head></head>
<body>
...
...
...
html
....
<script src="script1"/>
<script src="script2"/>
<script src="script3"/>
</body>
</html>
现在,如果我需要在 html 中间的某个地方访问这些 js 文件的某些功能,我该怎么做?假设代码是这样的
<html>
<head></head>
<body>
...
...
...
html
.....
<script>
$('a.test').modal('show);
</script>
....
<script src="script1"/>
<script src="script2"/>
<script src="script3"/>
</body>
</html>
“$”、“modal”等上方是附加在页面底部的js库的一部分。我将如何检测底部脚本的完成并触发脚本标记中编写的代码(
$('a.test').modal('show);
)