| HTML | CSS | JavaScript |XHTML, XML, ASP, |
JS BasicsJS HomeIntroduction Basics Operators Functions Conditional Looping JS ReferencesString ObjectArray Object Date Object Math Object Window Object Frame Object Form Object Browser Object |
JavaScript IntroductionJavascript was developed by Netscape Things you should know...
Stuff about Javascript that YOU will memorize
How to embed javascript into HTMLJavascript can be embedded onto anywhere in your HTML document, to do this, simply surround your script with the <script type="text/javascript">...</script> tags. The type attribute is to define how the following script will be read. Usually JavaScript is present in 2 places, one is the head section of the HTML document, the other is the body section of the document, however you can link to external JavaScript file by adding the src="..." attribute in your oppening section of your <script> tag. Here's a demostration:
<html>
<head>
<title>Demo</title>
<script src="thejavascript.js" type="text/javascript">
[statements]
</script>
</head>
<body>
<script type="text/javascript">
[statements]
</script>
</body>
</html>
|