|
JavaScript is a script language - a system of programming codes, created by Netscape, that can be embedded into the HTML of a web page to add functionality. JavaScript should not be confused with the Java programming language. In general, script languages such as JavaScript are easier and faster to code than more structured languages such as Java and C++. JavaScript only works with Java enabled browsers.
To get you started here are a few useful JavaScripts:
- Last Modified. If you want to know when a web page was last
modified, go to the page and then type the following Javascript
in the address field of your browser.
javascript:alert(document.lastModified)
Hit enter. A window will pop open displaying the date the page
was last uploaded.
- Print This Page Script. With this script you can create a
print-page link. Just copy this javascript below and insert this
code below where you want the print link to display on your pages
and your visitors can choose to print the page they are currently
viewing:
<a href='javascript:;'
onClick='window.print();return
false'>Print this page.</a>
- Back and Forward Links. Use these scripts to send your
visitors back or forward to your pages. Just copy the javascript
below and insert it where you want your links to appear:
<a href="javascript:history.back(1)">Go
Back</a>
<a href="javascript:history.forward(1)">Go
Forward</a>
- You can also use JavaScript to control your animation. For
example, the image below only becomes animated when you move your
mouse over the graphic. You can get this script for free at this
link.

Like more JavaScripts for your pages? Visit the links below.
You can cut & paste these scripts and use them on your Web
pages for free:
- »
Javascripts by Earthweb. Earhweb has a great selection of
scripts - over 2500 free scripts. They also have a tutorial aimed
at beginners. Earthweb is associated with HTML goodies, one of
the best HTML tutorials on the Internet.
- » The Java Script
Source. An excellent JavaScript resource with tons of "cut
and paste" JavaScript examples for your web pages.
- » Danny
Goodman's JavaScript Pages. Written by an author of books on
JavaScript and other web development tools. Not for the absolute
beginner.
- » Webdeveloper.com. A
premier site for web developers. It has great resources for both
the beginner and the advanced user. It has a lot of very useful
JavaScripts.
- » Javascript.com. A
good source for cut and paste scripts.
- » JavaScript
Search. They have hundreds of free JavaScripts, plus
tutorials, FAQ's, articles, and other resources.
Still not convinced? Read this article Spice Up Your Web Site With JavaScript, by
Shelley Lowery.
|