Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Netbeans 的新手,我创建了 web 项目,现在我想为一个 html 页面编写 javascript,我应该如何编写,
如果您想创建一个 .js 文件:文件 -> 新文件... -> 其他 -> JavaScript 文件
否则只需添加<script type="text/javascript">...</script>到 HTML 页面的头部。
<script type="text/javascript">...</script>
在您的 html 页面的头部:
<script type="text/javascript"> //your javascript code alert('Hello js'); </script>