그래서 나는 꽤 많은 시간 동안 클라이언트를위한 웹 사이트를 구축했으며 페이지 당 여러 가지 JavaScript 작업을 얻고 있습니다. 그래서 나는이 세대의 자바 스크립트 자료를 스트리밍하기로 결정했다. (이것은 아약스 콘텐츠, UI 조작 및 파싱을 포함한다.) 그래서 PHP에서 특정 순서로 스크립트를 생성하는 스크립트 제작자가 있습니다. 아직 준비가되지 않은 작업을 수행 할 위험이 없습니다. *
.효과 <Script> 사용
그렇다면 나는이 이상한 작은 수수께끼에 빠졌습니다. 이 같은 생산 스크립트에있는 효율성 ...
<script type="text/javascript">
script1.action();
script1.secondAction();
script2.action();
...
scriptN.action();
</script>
또는
<script type="text/javascript">script1.action()</script>
<script type="text/javascript">script1.secondAction()</script>
<script type="text/javascript">script2.action()</script>
<script type="text/javascript"> ... </script>
<script type="text/javascript">scriptN.action()</script>
는 귀하의 의견 주셔서 감사 있습니다.
* Obviously there can always be some inherent risk no matter how "Safe" you try to program.
[multiple versus single script tags] 가능한 중복 (http://stackoverflow.com/questions/6451156/multiple-versus-single-script-tags) –