<script>


<script> tag will be used to write javascript, vb script and other scripting languages. We can give reference to the external Script files.

Syntax:

<script language="javascript" src="external js location here..."></script> <script language="javascript"> function functionname(parameters) { //code to be executed here. } </script>

Example:

<html> <head> <title>HTML Tutorial</title> <script language="javascript"> function showtime() { alert(new Date().toLocaleString()); } </script> </head> <body> <input type="button" value="Show time" onclick="showtime();" /> </body> </html>

Output: <br/>

HTML Tutorial