Menu
Easy Java Script Code

Debugging JavaScript : Coercions
JavaScript is not a tightly typed language. Sometimes this comes in handy, but other times it can cause problems. 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 ...

How to Disable the Browser Back Button
Let's assume that you have a legitimate reason for disabling the back button. Maybe you need to restrain the user within a multi-page form. In this article, I show you how to disable the browser's Back button with a only few lines of Java Script code. More ...

Easy Graph Generating Code
If you want to display a graph on your web page, you could use a graphics program to draw the graph, but that's time consuming and the resulting graph is static, it can't change or grow. In this article I will show you how to generate graphs using JavaScript. More ...

Code to Fade Between Two different Pictures
You've probably seen websites where a picture fades out, being replaced by another picture that fades in. This effect is called a visual transition and it's easy to do with just a tiny bit of code. More ...

JavaScript Code for Binary to Decimal - Decimal to Binary Conversion
To convert a binary number to decimal add together the decimal weight of all positions that contain a 1. To convert a decimal number to binary place a 1 in all positions where you can subtract the weight of the binary position. More ...

JavaScript to Generate a Random Number Between X and Y
You can use the JavaScript Math object's .random() method to generate a random number between two values, it returns a random floating-point number between 0 and 1 so you'll need to perform additional operations on it to scale it. More ...

HTML5 and Local Storage
The HTML5 local storage mechanism is a nice replacement for cookies with it you can write up to 5MB of persistent data between multiple pages to a special file on the client computer. More ...

Code for Java Script Circle/Sphere Calculator
In this article you learn how to use to Java Script to create a Circle/Sphere calculator. The user enters the radius of a circle or sphere, and the calculator returns the area, circumference, surface area, and volume. The process for coding any calculator can be broken down into a step-by-step procedure. More ...

Working With the Keyboard in Java Script
Using Java Script you can determine which keyboard key the user pressed. You can use this information to block certain keys, to replace a key's character, or to perform an action based upon a specific key being pressed. In this article, I'll provide some basic code for working with the keyboard. More ...

Easy HTML5 Drag and Drop
In this example I show you how to use HTML5 drag-and-drop to make a nice little application that could be used to teach children which classification different animals belong in. This example includes only the minimal code for the application to work. More ...

JavaScript Variable Scope
Understanding variable scope is very important, because if you don't use scope properly, you could end up with unexpected results and a very confusing bug. The scope of a variable refers to the parts of the code from which it's visible. More ...


Learn more at amazon.com

Custom Search