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.
Sliding Menu Script
Creating amenu that will slide in from the side of the screen.
What is JavaScript Used For?
Just where does JavaScript fit into the overall picture when it comes to building web pages correctly.
Final Javascript Quiz
Test your knowledge of Javascript with this 50 question quiz.
Analysis Quiz
Use this quiz-maker script to write an analysis quiz with valued answers for your website.
Numbers to Words
Display numbers in words.
Referring Site
How to determine which site your visitor was last on.
JavaScript Glossary definition for: menubar
Bulletin Board / Forum Code Converter ...
Convert your pre-prepared forum entries between text, HTML, and bbCode with this script.
Google Maps - Satellite Images
How to create and use Google Maps.
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.
Google Maps - Zooming In and Out
How to create and use Google Maps.
Last Modified Date
Even where a page doesn't display the last modified date you can easily find it out.
JavaScript Making Decisions
You can nest one IF statement inside another using JavaScript.
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.
Hiding Your Email Address
Conceal your email addressfrom spam spiders.
Radio Button Validation
Everything you need to know about radio button creation and validation.
Understanding What Order to Run JavaScript Code
What order does JavaScript run its code in?
\$ 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.
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.
Print Button
Adding a print button to your page and controlling what will print.
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.
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.
Why JavaScript
How should you use JavaScript so that it enhances your site.
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.
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.
JavaScript and JScript : What's the Difference?
JavaScript and JScript, different languages for different browsers.
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.
What Version of Javascript
Determining which version of Javascript is supported by a browser.
Everything you Need to Know About Ajax...
When should you use asynchronous Ajax calls and when should you use synchronous.
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.
Everything You Need to Learn JavaScript
Want to use JavaScript on your web pages? There are several alternatives.
Target Window or Frame
What are the Javascript equivalents to the target attribute on links?
Random Array Sort
How to 'sort' an array in random order.
Modal Dialog Box
A cross browser solution to being ablwe to display a modal dialog box with the content of your choice.
Strings to Numbers
How to convert text strings to numbers in JavaScript.
Alternatives to eval
There is never any need to use eval in Javascript as there are always better ways to achieve the required result.
How to attach JavaScript into Your Page.
All you need to add to HTML to add JavaScript into the page is one script tag
Javascript and XHTML
How to put a Javascript on an XHTML page so that it will pass validation.
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.
Print Directly to Printer With JavaScript Not...
An explanation of some of the reasons why Javascript can't print a page without the print dialog popping up.
Quiz Script Generator
Create your own multiple question quizes with this quiz maker script.
Here's What JavaScript CAN'T Do
There are a few things that the JavaScript programming language does not let you do
Hello World
Start writing your own JavaScripts
Returning Multiple Values
How to return more than one value from a function.
A Brief History of Javascript
What is Javascript, who created it, and who controls the standards?
Getting Started
Introduction to a series of tutorials on programming with JavaScript
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.
How to Identify and Fix Common Javascript Errors
Mind you brackets and avoid this common javascript error.
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.
JavaScript Glossary definition for: Long
The IF Statement
The Javascript if statement.How to code and use it.
How the Javascript document.write method works.
How to Use 'GET' and 'POST' for Server Requests...
When should you use GET and when should you use POST with Ajax.
Block Exit Blockers User Script
Block onbeforeunload to stop web pages using exit blockers.
HTML in Javascript
A simple form that will convert HTML source code into Javascript.
Month and Day Names
Add month and day name methods to your dates.
Concentration Memory Game with Images Sa...
Put a game of concentration on your site and test your visitor's memory.
No Right Click Script
Block the context menu and annoy your visitors with this simple script.
Day of Year Date Method
How to add a method to Javascript dates that allows you to get the day of the year.
Array Maximum and Minimum Values
Extracting the maximum or minimum value from an array.
The JavaScript Modulo Bug
The modulo operator in JavaScript does not return the correct value for negative numbers.
Multiple Choice Quiz Script Sample
This example quiz was built with the multiple choice quiz generator.
Password Generator
Create your own secure passwords that meet certain length and content requirements.
The CASE Statement
The Javascript case statement. How to code and use it.
Function to Read Parameters Passed Via Q...
How to pass parameters between pages using query strings.
Passing Parameters
Functions can process different variables each time when you call them using parameters.
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
Converting IP Addresses
Convert easily betweeen IP address formats with 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.
Positioning the Popup Window
Changing the size of the popup window.
Head Scripts and Body Scripts
Where in your web page to put Javascripts.
Writing Cookies
How to write a cookie with Javascript.
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.
Addslashes and Stripslashes
How to use addslash and stripslash with Javascript.
Equals, Equals Equals, or Equals Equals Equals
Using one, two or three equals signs in Javascript depending on what you need to achieve
setTimeout or setInterval
What is the difference between setTimeout and setInterval?
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.
Modern Combo Boxes
HTML doesn't have a tag to produce a combo box but we can use JavaScript to create our own.
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.
Two Types of JavaScript
Some JavaScript code just makes your page look a little nicer and more interactive. Other JavaScript provides more essential functionality.
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.
A Quick Guide to Using Child Nodes in Java
The property allowing us to access the nodes contained within the current node is actually a nodelist since a node can of course contain more than one node.
Disable No Right Click Scripts
Disable no right click scripts that globally override the onclick onmousedown or oncontextmenu events.
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.
Google Maps - Latitude and Longitude
Find out how to identify location using latitude and longitude on Google maps to display relevant information on your webpage.
Javascript Format and Colour
Unobfuscate, format, and colour-code a Javascript.
Continuous Text Marquee Code
Want a continuous text marquee for your website? Use this code for a simple marquee.
Counting Words
How to use Javascript to count the number of words that have been entered into a text area.
Adding Days to a Date
How to make it as easy as possible to add or subtract days from a date.
Cross Browser Ticker/Marquee Example
Add a simple ticker/marquee to your page with this simple Javascript
Quiz Maker 1 Body Script
Use this quiz maker script to create multiple-choice questions for your website.
Defining Classes
How to define Classes in Javascript.
Tools for Making JavaScript
What tools do you need to write JavaScript?
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.
Multiple Personality Quiz
Create your own multiple question personality quizes with this quiz maker script.
Follow the Mouse Sample
A simple script to get an object to follow the mouse.
Last Day of Month
How to find out the number of days in the current month.
Drop Down List Validation
How to validate that an appropriate entry is selected from a drop down list
Reserved Words
A list of Javascript reserved words and other words with special meanings.
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.
Cross Browser Ticker/Marquee Script RtoL...
Need a simple ticker or marquee for your website? Use this easy script.
Add Falling Snow
How to add the falling snow script to your web page.
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.
Documenting your Javascript.
Mouse Cursor Position
How to determine where the mouse cursor is positioned in the web page when an event is triggered.
Countdown Timer
Provides a countdown to a given date and time.
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.
Credit Card Validation
Validate credit card numbers in forms with this Javascript routine for validating the length and check digits.
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.
Using Modal Dialog Box Javascript
A cross browser solution to being able to display a modal dialog box with the content of your choice.
JavaScript Encryption
Effective encryption using JavaScript
Copy and Paste
How to copy and paste Javascripts.
JavaScript By Example
The difference between replacing and updating a cookie is that in updating a cookie we first need to read the current value stored there.
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.
Body Mass Index Calculator HTML
This body mass index calculator uses your height and weight to calculate your BMI.
JavaScript Glossary definition for: location
Personality Quiz Script Generator
Create your own multiple question personality quizes with this quiz maker script.
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.
The Purpose of Functions
What is a function and why should we use them in JavaScript
First Time Only
Perform processing only when your visitor first visits the page.
JavaScript Library or Code Yourself
Should you use a JavaScript library or write all the code yourself. Both ways have advantages and disadvantages.
JavaScript and Unicode
JavaScript can work with unicode as well as ASCII.
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.
Event Listeners
The standard DOM way of listening for events to be triggered.
Concentration Memory Game Sample
Want people to spend time on your site? Add this game of concentration and challenge your readers' memory.
More DOM collections on any tag you like.
HTML Comments and JavaScript
Why use HTML comments around JavaScript.
JavaScript for Beginners
Before beginners to JavaScript can start writing their own scripts they first need to understand some of the basic terminology and concepts.
javascript, example code
To delete a column we need to delete the specific cells in that column.
JavaScript Alert
The JavaScript language itself provides very few debugging tools. One of the few that it does provide and perhaps the most useful is alert().
JavaScript Glossary definition for: Images
Noughts and Crosses
Add an unobtrusive noughts and crosses (tic-tac-toe) game to your web page.
More DOM collections on any class you like.
Submitting after validation
How to submit the form once it has been validated.
JavaScript Glossary definition for: Image
Body Mass Index Calculator
This body mass index calculator uses your height and weight to calculate your BMI.
How to Use Optional Parameter Functions in...
JavaScript has its own unique way of handling where you want parameters to your function to be optional.
View Source Bookmarklet
View the page source as seen by your web browser with this bookmarklet
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.
Built-in Functions: alert, confirm, prompt
JavaScript provides built in functions to display dialog boxes
Formatting Numbers
How to format numbers nicely before outputting them to your page.
Use responseText and responseXML
Using responseText and responseXML determines if the server responses in AJAX are in XML or plain text. The field in which the response is returned depends upon what format is being used.
Remove Formatting from Numbers
A simple script to remove all the formatting from phone numbers.
Making it Move
Animation is really about moving things around the screen.
Window Close
How to close a browser window using Javascript.

©2015 About.com. All rights reserved.