Menu
Easy Java Script Code

Use JavaScript parseInt() and parseFloat() to Convert Strings to Numbers
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 ...

How Far Did the User Scroll?
In this article you learn how to use Java Script to determine how far a user scrolled your webpage before leaving, and how to log this data on the server with an example using ASP. More ...

HTML5 Canvas JavaScript Code to a Draw Bezier Curve
The HTML5 canvas element allows you to, when you don't need an extremely complex image, not require your webpage to load an image file, but instead to use JavaScript to the draw the graphics on your webpage. More ...

Using the Java Script Array Object
When you want to work with multiple related values, you can use the Array object. The new keyword is required when creating an array of object type data, like an array of string objects. The new keyword is not required when creating an array of simple variable types, like integers. In this article you learn about mutidimensional arrays, and study examples of how to use each Array Object method. More ...

HTML5 Canvas Storing and Clearing Transformations
With HTML5 Canvas, it's possible to save the current transformation, do some drawing and transforming, and then restore the old transformation. More ...

Easy Java Script Animation
There are many ways to create an animation, but the simplest way is to use Java Script along with CSS. In this article, I show you how to create simple Java Script animations. More ...

Java Script to Get Selected Item from Drop-down Select List
An HTML Select list is a form control used to create a drop-down list of items from which the user can select. This article provides code to get the selected item from a select list. More ...

Sams Teach Yourself HTML5 in 10 Minutes
One important part of the new HTML5 specification is the new date-time picker control. In this book you create a webform that uses the new date-time picker control, and you'll also create a small PHP server-side program that displays the value you entered into the date-time picker control when you click the Submit button to show how you can extract data from the control on the server. More ...

Calculate The Points of an Equilateral Triangle
Starting an equilateral triangle is easy, you just draw a line. However, drawing the third point to create an exact equilateral triangle requires a bit of calculation. More ...

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 ...

Synchronous and Asynchronous Script Loading
Whether to use synchronous or asynchronous script loading depends upon the design of the webpage. Asynchronous script loading can cause the webpage can render more quickly. But if done without consideration for the design it can cause webpage flash or even errors. More ...

Easy Java Script Butterfly Animation
You'll be surprised at how little code it requires and how easy it is to use Java Script along with CSS to create an animation. In this article, I show you how to create a simple butterfly animation. More ...


Learn more at amazon.com

Custom Search