To include an external JavaScript file named "xxx.js" in an HTML document, you can use the following syntax within the <script> tag:
<script src="xxx.js"></script>
html复制成功复制代码
Make sure that the "xxx.js" file is located in the same directory as the HTML file, or provide the correct path to the file if it is in a different directory.