Heim  >  Fragen und Antworten  >  Hauptteil

<script></script>标签的位置?

为什么有的代码<script></script>插在<head></head>标签中,有的插在<body></body>标签中?这两种有什么区别?

phpcn_u233phpcn_u2332857 Tage vor1321

Antworte allen(1)Ich werde antworten

  • 阿神

    阿神2016-12-24 17:52:08

    <script>在head标签里可以先执行编译,方便function方法的调用

    Antwort
    0
  • StornierenAntwort