Maison  >  Questions et réponses  >  le corps du texte

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

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

phpcn_u233phpcn_u2332857 Il y a quelques jours1332

répondre à tous(1)je répondrai

  • 阿神

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

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

    répondre
    0
  • Annulerrépondre