Create a Website
HTML
Dreamweaver
CSS Tutorial
JavaScript
FREE Domain!
Any web hosting you subscribe with DotEasy will get you a FREE domain name registration.
PLUS you get:
  • FREE Website Builder
  • FREE Blog
  • FREE Forum
  • FREE Photo Album
  • FREE Email Accounts
Get your FREE domain name today!
Home > JavaScript Tutorial
SSD Web Hosting with FREE Domain

JavaScript How-to

Below is a classic example on how to use JavaScript to print text. I know this isn't very interesting, but it will be a good way to explain how JavaScript works and its basic syntax.

Example Code

The JavaScript below writes text JavaScript is Fun! to the page.

The Code

<script type="text/javascript">
<!--
document.write("JavaScript is Fun!");
//-->
</script>

The output is:
JavaScript is Fun!
Explanation of Code

Enjoy this tutorial?

1. Link to this page(copy/paste into your own website or blog):
2. Add this page to your favorite social bookmarks sites:
3. Add this page as your favorites. (Press Ctrl+D)