# To insert a JavaScript into an HTML page, we use <script> tag.
# Inside the <script> tag we use the type attribute to define the scripting language.
# So, the <script type="text/javascript"> and </script> tells where the JavaScript starts and ends.
<html><body><script type="text/javascript">...</script></body></html>
<html><body><script type="text/javascript">document.write("Hello World!");</script></body></html>
<html><head><script type="text/javascript">function message(){alert("Test Message");}</script></head><body onload="message()"></body></html>
<html><head><script type="text/javascript" src="Extfile.js"></script></head><body></body></html>
For more details on Javascript visit Techblog
No comments:
Post a Comment