Javascript Tips #3 : Always include Your JavaScript Code in Script Tag.
Note down following things -
- The <script> tag is used to define JavaScript.
- The <script> element contains scripting statements, or it can refer an external script file using the src attribute.
- Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
Example :
<html> <body> <script> document.write("Hello World!") </script> </body> </html>
The <script> tag is supported in all major browsers.