JavaScript Tutorials

 

ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.


If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)


PDF mobile

JavaScript Tutorials

How to include JavaScript in HTML

To include dynamic JavaScript code in an HTML page, code the HTML <script> tag in the <head> section.

<head>
   ... metadata content ...
   <title>... text content ...</title>
   ...
   <script type="text/javascript" src="..."></script>
   <script type="text/javascript">
      ... JavaScript code ...
   </script>
   ...
</head>

See the <script> tag reference for details on how to code the <script> tag.

Tutorials on JavaScript for Beginners
onload Function Chaining
JavaScript escape vs. encode
A comparison of the JavaScript functions escape, encodeURI and encodeURIComponent showing the difference between them.
Advanced JavaScript Tutorials
XMLHttpRequest
XMLHttpRequest is a JavaScript object type that can be used to retrieve a resource via a URL. Despite the Http in the name of the type, an XMLHttpRequest object can be used to retrieve resources via various protocols including the
  • http,
  • ftp, and
  • file protocols.

Valid HTML 5