Dave's Brain

Browse - Programming Tips - How do I declare javascript code in an html file?

Date: 2014jan16
Language: javaScript

Q.  How do I declare javascript code in an html file?

A.  Like this:

<script type="text/javascript"> ... your code goes here ... </script>
The old way:
<script language="javascript"> WRONG ... your code goes here ... </script>

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.