Article

Home » Client-side Coding » JavaScript & Ajax Tutorials » JavaScript 101 - Part 1

About the Author

Kevin Yank

author_kev1 Kevin began developing for the Web in 1995 and is a highly respected technical author. He wrote Build your own Database Driven Website using PHP and MySQL, a practical step-by-step guide published by SitePoint, and he's co-author of the SitePoint Tech Times, a bi-weekly newsletter for technically-minded web developers. Kev believes that any good webmaster should have seen at least one episode of MacGyver.

View all articles by Kevin Yank...

JavaScript 101 - Part 1

By Kevin Yank

June 22nd, 2001

Reader Rating: 8.5

Page: 1 2 3 4 5 Next

This article was originally published by Sausage Software, makers of the HotDog Professional Web Editor. Reprinted here by permission.

Since the release of Netscape 2 (so long ago that no one remembers!), browsers have included support for more than static HTML. They also have permitted Web authors to include scripts in their pages. Scripts are basically small programs that can react to events occurring in the browser (e.g. the user clicking a link), or other factors (e.g. the current date and time) by changing the Web page in some way.

In contrast to CGI programs (also known as "CGI Scripts"), and other server-side scripts (PHP, ASP, etc.) that are run by a Web server before a requested page is sent to the user's browser, scripts are downloaded as part of the Web page and are run right inside the user's Web browser. While this raises issues of compatibility between different browsers (i.e. older browser versions don't support some of today's fancier script-based tricks), it allows scripts to react to a richer set of events occurring in the browser without the overhead of having the browser contact the Web server to ask what to do every time an event occurs. Furthermore, scripts don't require any special support from the Web server, so you can use scripts in your Web page even if your Web host doesn't let you install custom CGI scripts on your Web site (most ISP's don't).

And besides, scripts are just a whole lot more fun!

If some of the technical jargon above has you a little scared, don't worry. In this, the first in my three-part JavaScript 101 series of articles, I'll teach you everything you need to know to move from the tags-and-attributes world of HTML into the realm of functions and variables that is JavaScript. All I'll assume is that you have a good understanding of HTML.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article