是否可以从其他脚本标记执行javascript,例如:
<script>
script 1
execute script 2 from other script tag here after first script is completed
</script>
<script>
script 2
</script>
答案 0 :(得分:0)
如果脚本2是内联的,您可以这样做:
<script>
function1() {
...
}
window.onload=function() {
function1();
function2();
}
</script>
<script>
function2() { ... }
</script>