1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

JavaScript: Most Popular Articles

These articles are the most popular over the last month.
Are JavaScript and Java the Same Language?
JavaScript is a popular programming language that's built into all the major web browsers and used to make web pages interactive. This article will answer all your basic questions about what JavaScript is and how to use it -- even if you aren't a computer programmer.
Looking to Download JavaScript Snippets? Here's...
You don't have to pay for JavaScript, and you don't have to write it yourself either -- unless you want to. We'll help you understand your options for finding, downloading, and customizing free JavaScript code.
What is JavaScript Used For?
Just where does JavaScript fit into the overall picture when it comes to building web pages correctly.
Analysis Quiz
Create your own multiple question quizes with this quiz maker script.
Numbers to Words
Display numbers in words.
Final Javascript Quiz
Test your knowledge of Javascript with this 50 question quiz.
Do This Instead of Updating Global Variables in...
As well as being able to pass parameters to a function in JavaScript, we can also return a value from the function.
JavaScript Glossary definition for: menubar
JavaScript Making Decisions
You can nest one IF statement inside another using JavaScript.
Referring Site
How to determine which site your visitor was last on.
Should You Have a Shorter IF Statement?
When you are assigning different values to a single field depending on a condition, JavaScript provides a way to combine the decision into the assignment.
Print Button
Adding a print button to your page and controlling what will print.
How Hard is JavaScript To Learn?
How difficult something is to learn depends on what you already know and how similar the new thing is to what you know.
\$ and _ in JavaScript
The $ and _ characters are treated differently in JavaScript to the way you might expect. JavaScript considers them to be letters in some circumstances rather than special characters.
Bulletin Board / Forum Code Converter ...
Convert your pre-prepared forum entries between text, HTML, and bbCode with this script.
Why JavaScript
How should you use JavaScript so that it enhances your site.
Adding Validation to the Submit Button ...
Uodating the Submit button to perform validation before submitting.
Hex to Decimal and Decimal to Hex
How to convert between decimal and hexadecimal.
Understanding What Order to Run JavaScript Code
What order does JavaScript run its code in?
Radio Button Validation
Everything you need to know about radio button creation and validation.
Hiding Your Email Address
Conceal your email addressfrom spam spiders.
Last Modified Date
Even where a page doesn't display the last modified date you can easily find it out.
JavaScript and JScript : What's the Difference?
JavaScript and JScript, different languages for different browsers.
Week of Year Date Method
How to add a method to Javascript dates that allows you to get the week number.
Deleting Cookies
How to delete a cookie with Javascript.
External Javascripts
You don't have to code the Javascript in your web page, you can code it in a separate file and link to it instead.
How to Split Webpage JavaScript into Separate...
When you first write a new JavaScript the easiest way to set it up is to embed the JavaScript code directly into the web page.
Sample Hangman
Create your own hangman game with this script maker.
Javascript and XHTML
How to put a Javascript on an XHTML page so that it will pass validation.
Block Exit Blockers User Script
Block onbeforeunload to stop web pages using exit blockers.
Modal Dialog Box
A cross browser solution to being ablwe to display a modal dialog box with the content of your choice.
Google Maps - Satellite Images
How to create and use Google Maps.
Obtaining Your Visitor's IP Address
There are a number of different ways that JavaScript can gewt the IP address of your visitor's computer.
Target Window or Frame
What are the Javascript equivalents to the target attribute on links?
Daylight Saving Time
How to add methods to the JavaScript Date object that allow you to determine if your visitor is on daylight saving time.
Random Array Sort
How to 'sort' an array in random order.
Continuous Image Marquee
This script allows you to display one or more marquees containing images that will scroll continuously without a break except when the mouse is moved over them.
Countdown Timer
Provides a countdown to a given date and time.
Continuous Text Marquee
This script allows you to display one or more marquees containing text that will scroll continuously without a break except when the mouse is moved over them.
Everything You Need to Learn JavaScript
Want to use JavaScript on your web pages? There are several alternatives.
Everything you Need to Know About Ajax...
When should you use asynchronous Ajax calls and when should you use synchronous.
Alternatives to eval
There is never any need to use eval in Javascript as there are always better ways to achieve the required result.
A Brief History of Javascript
What is Javascript, who created it, and who controls the standards?
How the Javascript document.write method works.
How to attach JavaScript into Your Page.
All you need to add to HTML to add JavaScript into the page is one script tag
Here's What JavaScript CAN'T Do
There are a few things that the JavaScript programming language does not let you do
Day of Year Date Method
How to add a method to Javascript dates that allows you to get the day of the year.
Defining Classes
How to define Classes in Javascript.
Hello World
Start writing your own JavaScripts
What Version of Javascript
Determining which version of Javascript is supported by a browser.
The JavaScript Modulo Bug
The modulo operator in JavaScript does not return the correct value for negative numbers.
Strings to Numbers
How to convert text strings to numbers in JavaScript.
How to Use 'GET' and 'POST' for Server Requests...
When should you use GET and when should you use POST with Ajax.
The IF Statement
The Javascript if statement.How to code and use it.
How to Identify and Fix Common Javascript Errors
Commonly made Javascript errors and how to find them
Concentration Memory Game with Images Sa...
Put a game of concentration on your site and test your visitor's memory.
Counting Words
How to use Javascript to count the number of words that have been entered into a text area.
How to Write a Session Cookie in Javascript
Web browsers distinguish between three different types of cookies. These types are session cookies, first party cookies, and third party cookies.
A Simple Guide to Using "Ternary" Operators in...
The ternary operator provides a shorter way of writing some JavaScript if statements as this example demonstrates.
Returning Multiple Values
How to return more than one value from a function.
Quiz Script Generator
Create your own multiple question quizes with this quiz maker script.
Getting Started
Introduction to a series of tutorials on programming with JavaScript
Password Generator
Create your own secure passwords that meet certain length and content requirements.
JavaScript Glossary definition for: Long
Use This Piano Chord Calculator To Play ...
This piano chord calculator displays the notes and fingering positions to help you to play almost any chord on any keyboard.
No Right Click Script
Block the context menu and annoy your visitors with this simple script.
Month and Day Names
Add month and day name methods to your dates.
Print Directly to Printer
An explanation of some of the reasons why Javascript can't print a page without the print dialog popping up.
Equals, Equals Equals, or Equals Equals Equals
Using one, two or three equals signs in Javascript depending on what you need to achieve
How to use script tags to link to external...
To link to external JavaScript, use Script tags. These attributes will attach another JavaScript to the page, allowing further JavaScript code to run.
Converting IP Addresses
Convert easily betweeen IP address formats with JavaScript.
Reserved Words
A list of Javascript reserved words and other words with special meanings.
Two Types of JavaScript
Some JavaScript code just makes your page look a little nicer and more interactive. Other JavaScript provides more essential functionality.
Head Scripts and Body Scripts
Where in your web page to put Javascripts.
Positioning the Popup Window
Changing the size of the popup window.
Drop Down List Validation
How to validate that an appropriate entry is selected from a drop down list
Cross Browser Ticker/Marquee Script RtoL...
Add a simple ticker/marquee to your page with this simple Javascript
Recursive Calls in JavaScript
There are two ways of setting up recursive function calls in JavaScript
Calendar Generator
Create the HTML code for a calendar to add to your page
Google Maps - Zooming In and Out
How to create and use Google Maps.
Writing Cookies
How to write a cookie with Javascript.
Multiple Choice Quiz Script Sample
This example quiz was built with the multiple choice quiz generator.
HTML Comments and JavaScript
Why use HTML comments around JavaScript.
Mouse Cursor Position
How to determine where the mouse cursor is positioned in the web page when an event is triggered.
Using Increment and Decrement Operators in...
For those new to programming the difference between ++i and i++ is not obvious. Here's a simple example to explain the difference.
Javascript Format and Colour
Unobfuscate, format, and colour-code a Javascript.
How using innerHTML can save you some time
The innerHTML property is a convenient way to access the entire content of the HTML container. It can be used to either retrieve from or insert content into a container.
Multiple Personality Quiz
Create your own multiple question personality quizes with this quiz maker script.
Google Maps - Latitude and Longitude
How to create and use Google Maps.
JavaScript Encryption
Effective encryption using JavaScript
The CASE Statement
The Javascript case statement. How to code and use it.
Continuous Text Marquee Code
This script allows you to display one or more marquees containing text that will scroll continuously without a break except when the mouse is moved over them.
Submitting after validation
How to submit the form once it has been validated.
Passing Parameters
Functions can process different variables each time when you call them using parameters.
Last Day of Month
How to find out the number of days in the current month.
Array Maximum and Minimum Values
Extracting the maximum or minimum value from an array.
Objects and Properties
Javascript is Object Oriented which means it uses objects.
setTimeout or setInterval
What is the difference between setTimeout and setInterval?
JavaScript Testing
There are a number of different types of error that can occur with your JavaScript. Some types of error are easier to detect than others.
Follow the Mouse Sample
A simple script to get an object to follow the mouse.
Why You Shouldn't Use JavaScript in Emails
Why not to use JavaScript with emails? Well there are some good reasons why JavaScript and Emails don't go together.
Formatting Numbers
How to format numbers nicely before outputting them to your page.
Getting Rid of document.write
The document.write statement was an essential part of early JavaScripts but is now completely unnecessary as anything that can be done with document.write can be done better using innerHTML.
HTML in Javascript
A simple form that will convert HTML source code into Javascript.
Addslashes and Stripslashes
How to use addslash and stripslash with Javascript.
Using Pre-written JavaScript Scripts
The actual steps required to use a pre-written JavaScript with your page are not always included with the script. Here is a step by step list of what you need to do in order to be able to use any pre-written JavaScript in your page. You will still need to refer to the instructions with the script for the details though.
Function to Read Parameters Passed Via Q...
How to pass parameters between pages using query strings.
JavaScript Date Selection Correcting Days in...
How to fix a date selection dropdown to display the right number of days when the year and month have already been selected.
Credit Card Validation
Validate credit card numbers in forms with this Javascript routine for validating the length and check digits.
Numeric Array Sort
How to sort a numeric array in ascending or descending order.
Using Modal Dialog Box Javascript
A cross browser solution to being able to display a modal dialog box with the content of your choice.
Add or Subtract Business Days
How to add a method to Javascript dates that allows you to add or subtract business days from a date.
JavaScript By Example
Br having your function return an object you can pass back as much information as you like by giving the object multiple properties.
Sliding Menu Script
Creating amenu that will slide in from the side of the screen.
Modern Combo Boxes
HTML doesn't have a tag to produce a combo box but we can use JavaScript to create our own.
Back Button
Providing a way for visitors to return to the previous page that they were on.
Copy and Paste
How to copy and paste Javascripts.
Body Mass Index Calculator
This body mass index calculator uses your height and weight to calculate your BMI.
Cross Browser Ticker/Marquee Example
Add a simple ticker/marquee to your page with this simple Javascript
5 Remarkably Good Reasons to Avoid 'Noscript'...
The noscript tag is long past its use by date. Using JavaScript and the DOM gives much better control.
What 'Interpreted' and 'Compiled' Means in Java
JavaScript runs as an interpreted language in the web browser. This impacts on how you need to write your code in ways you wouldn't need to worry about if it were compiled.
First Time Only
Perform processing only when your visitor first visits the page.
Disable No Right Click Scripts
Disable no right click scripts that globally override the onclick onmousedown or oncontextmenu events.
Adding Days to a Date
How to make it as easy as possible to add or subtract days from a date.
Submit the form only once
How to stop a form accidentally being submitted twice.
JavaScript Library or Code Yourself
Should you use a JavaScript library or write all the code yourself. Both ways have advantages and disadvantages.
Event Listeners
The standard DOM way of listening for events to be triggered.
More DOM collections on any tag you like.
Using HTML to Create Collapsible Div Menus
HTML collapsible div menus save space on the web page. The content heavy page becomes “decluttered” which improves its aesthetic and functionality.
Built-in Functions: alert, confirm, prompt
JavaScript provides built in functions to display dialog boxes
JavaScript By Example: Get Parent Node
Node properties don't just include pointers to the immediately adjacent sibling nodes, there is also a pointer to the parent node (the tag within which the current element or text is contained).
Finding and Fixing Errors
When you write programs your code will contain errors. You need to find and fix those errors.
Falling Leaves
You can have leaves falling slowly down your web page if you install this special effects JavaScript.
The WHILE Loop
The while loop is even easier to use than the for loop.
Switch Fallthrough
Allowing code to fall through within a switch statement can cause issues in trying to maintain your code and can easily be avoided.
Page Events
How to code event handlers to run Javascript code after a page has finished loading or when your visitor leaves the page.
A # by itself in the href attribute is not valid. Sites teaching you how to write HTML and JavaScript use it as a placeholder that should be replaced in live code with a real destination.
Null and Undefined
Both null and undefined in JavaScript do not always behave as you might expect them to.
Analog Clock Script
A javascript to calculate and display a fully customizable analog clock
Aborting AJAX
Tutorials on how to use AJAX
Upper and Lowercase Conversion
How to convert between upper and lowercase.
Google Maps - Multiple Maps on One Page
How to create and use Google Maps.
View Source Bookmarklet
View the page source as seen by your web browser with this bookmarklet
Semicolons and JavaScript
With JavaScript allowing you to leave out the semicolons on the end of statements you can end up with what you think is a single statement which JavaScript thinks is two separate statements or vice versa.
Add Continuous Text Marquee
This script allows you to display one or more marquees containing text that will scroll continuously without a break except when the mouse is moved over them.
javascript, example code
To delete a column we need to delete the specific cells in that column.
Remove Formatting from Numbers
A simple script to remove all the formatting from phone numbers.
Timed Window Close
Setting your pupup window to automatically close after a set time.
Body Fat Calculator
This body fat calculator estimates your body fat content using the US Navy formula.
JavaScript and HTML
Some ways of adding JavaScript to HTML are better than otherst.

©2015 About.com. All rights reserved.