how to write javascript file in Netbeans IDE 6.7.1

4.9k Views Asked by At

i am new to Netbeans, i created the web project, now i want to write javascript for one html page, how should i write,

2

There are 2 best solutions below

1
On

in the head of your html page:

<script type="text/javascript">
    //your javascript code
    alert('Hello js');
</script>
0
On

If you wish to create a .js file: File -> New File... -> Other -> JavaScript File

Else just add <script type="text/javascript">...</script> to head of your HTML page.