更新时间:2023-01-08 12:59:35
你不能这样做。不是将JavaScript写入页面,而是将其写入.js文件(即:script.js),然后使用脚本标记引用.js文件:
You cannot do this. Instead of writing your JavaScript to a page, write it to a .js file (i.e.: script.js) and then reference the .js file with a script tag:
<script type="text/javascript" src="script.js"></script>