Easy Java Script Code
Using a Select List for Navigation
An HTML Select list is a form control used to create a drop-down list of items from which the user can select. You can use a select list as a navigation element by setting each option element's value attribute to the URL of a web site or web page. More ...
Round a Float to 4 Digits to the Right of the Decimal Point
On the typical PC, Java Script Math object methods can return floating point numbers with
up to 16 digits to the right of the decimal point. For most purposes, this kind of
accuracy is not required, nor desired, and that many digits causes nothing but confusion.
In this article, You'll learn how to round a floating point number to 4 digits to the
right of the decimal point. More ...
Easy Slide Show Code with Mouseover Pause
This article provides easy-to-use cut-and paste code for a Web page slide show, except
this example has the extra feature that when the visitor moves their mouse pointer over
the image, the slide show image will not change again until they move their mouse pointer off the image. More ...
Java Script Comparison Operators
A comparison operator compares two values and returns the result "true" or "false". For comparing numeric values the operators perform the same as they do in algebra. For comparing character strings each character in the strings are converted to their ASCII values and then a numeric comparison is made. More ...
Put Commas in Your Java Script Calculators
Writing large numbers with the digits in groups of three make the numbers easier to read. In this article you'll learn how to code calculator applications that will accept the entry of numbers with commas, and return results with commas. More ...
Calendars for Your Website
I'll start by showing you how to code a basic calendar that shows the current month with the current
day highlighted. Then, how to code a webpage that can display several months simultaneously, and
finally, a clickable appointments calendar. More ...
If the results of a mathematical operation in your script are not what you expected, make sure that you convert any numbers represented as strings to the actual number data type before performing the operation. More ...
Easy Code for Date Count Down
One of the most powerful incentives for people to make a purchase is scarcity, and one of the most popular ways to create scarcity is have a "limited time" offer. Web pages that present a limited time offer always have a count down timer to let you know how much time is left. More ...
Using the Java Script Date Object
When you want to work with a date in Java Script, you need to use the Date object. In this
article, you learn how to create a Date object for today, or for any date in the past or future.
You learn how to find the difference between two dates, and how to format a date string any way
that you desire. You also learn how to validate a date string returned from a text box in a form,
Play Music on Your HTML5 Web Page
In this article you learn how to play and control music on your webpage including adding a play list and custom controller. More ...
Password Protection Using the Frames Method
One method of password protecting your webpages is to use a cookie, but cookies are
unreliable. If you can't trust a cookie to store the information that the user is
logged in, where can you store it? In this example I'll show you how to use frames
Creating Basic Java Script Functions
In this article you learn how to create basic Java Script functions. You learn how to use parameters and how to return values, including how to return an array from a function. The article also intoduces variable scope. More ...