JavaScript in the Browser
script
tag loads JavaScript. src
attribute. <html> <head> <title>The date</title> <script language="JavaScript"> function printDate() { var d = new Date(); document.write(d.toLocaleString()); } </script> </head> <body> <p>The date and time are:<br/> <script language="JavaScript"> printDate(); </script> </p> </body> </html>Load it
<script type="text/javascript" ..
3 of 66