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.
Analysis Quiz
Use this quiz-maker script to write an analysis quiz with valued answers for your website.
What is JavaScript Used For?
Just where does JavaScript fit into the overall picture when it comes to building web pages correctly.
Numbers to Words
Display numbers in words.
Final Javascript Quiz
Test your knowledge of Javascript with this 50 question quiz.
Google Maps - Zooming In and Out
How to create and use Google Maps.
Google Maps - Satellite Images
How to create and use Google Maps.
Bulletin Board / Forum Code Converter ...
Convert your pre-prepared forum entries between text, HTML, and bbCode with this script.
Referring Site
How to determine which site your visitor was last on.
Why JavaScript
How should you use JavaScript so that it enhances your site.
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.
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.
Everything You Need to Learn JavaScript
Want to use JavaScript on your web pages? There are several alternatives.
JavaScript Making Decisions
You can nest one IF statement inside another using JavaScript.
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.
Loan Repayment Calculator
This JavaScript adds a loan repayment calculator to your page.
\$ 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.
Print Button
Adding a print button to your page and controlling what will print.
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.
Understanding What Order to Run JavaScript Code
What order does JavaScript run its code in?
Deleting Cookies
How to delete a cookie with Javascript.
Week of Year Date Method
How to add a method to Javascript dates that allows you to get the week number.
Radio Button Validation
Everything you need to know about radio button creation and validation.
How to Identify and Fix Common Javascript Errors
Mind you brackets and avoid this common javascript error.
JavaScript and JScript : What's the Difference?
JavaScript and JScript, different languages for different browsers.
Hex to Decimal and Decimal to Hex
How to convert between decimal and hexadecimal.
Last Modified Date
Even where a page doesn't display the last modified date you can easily find it out.
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.
What Version of Javascript
Determining which version of Javascript is supported by a browser.
Adding Validation to the Submit Button ...
Uodating the Submit button to perform validation before submitting.
Javascript and XHTML
How to put a Javascript on an XHTML page so that it will pass validation.
How the Javascript document.write method works.
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.
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.
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.
A Brief History of Javascript
What is Javascript, who created it, and who controls the standards?
Tools for Making JavaScript
What tools do you need to write JavaScript?
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.
Quiz Script Generator
Create your own multiple question quizes with this quiz maker script.
Hello World
Start writing your own JavaScripts
Target Window or Frame
What are the Javascript equivalents to the target attribute on links?
Returning Multiple Values
How to return more than one value from a function.
Everything you Need to Know About Ajax...
When should you use asynchronous Ajax calls and when should you use synchronous.
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.
Loan Repayment Calculator Example
This script adds a loan repayment calculator to your page.
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.
How to Use 'GET' and 'POST' for Server Requests...
When should you use GET and when should you use POST with Ajax.
Day of Year Date Method
How to add a method to Javascript dates that allows you to get the day of the year.
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.
Month and Day Names
Add month and day name methods to your dates.
How to attach JavaScript into Your Page.
All you need to add to HTML to add JavaScript into the page is one script tag
Multiple Choice Quiz Script Sample
This example quiz was built with the multiple choice quiz generator.
Choosing Pre-Built Scripts
Easy tests to determine if pre-built scripts have been properly tested by their author
Calendar Generator
Create the HTML code for a calendar to add to your page
JavaScript Glossary definition for: Long
Recursive Calls in JavaScript
There are two ways of setting up recursive function calls in JavaScript
Here's What JavaScript CAN'T Do
There are a few things that the JavaScript programming language does not let you do
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.
Countdown Timer
Provides a countdown to a given date and time.
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.
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.
The IF Statement
The Javascript if statement.How to code and use it.
Sample Hangman
Create your own hangman game with this script maker.
Alternatives to eval
There is never any need to use eval in Javascript as there are always better ways to achieve the required result.
Body Fat Calculator
This body fat calculator estimates your body fat content using the US Navy formula.
Strings to Numbers
How to convert text strings to numbers in JavaScript.
Equals, Equals Equals, or Equals Equals Equals
Using one, two or three equals signs in Javascript depending on what you need to achieve
Block Exit Blockers User Script
Block onbeforeunload to stop web pages using exit blockers.
No Right Click Script
Block the context menu and annoy your visitors with this simple script.
Multiple Personality Quiz
Create your own multiple question personality quizes with this quiz maker script.
Counting Words
How to use Javascript to count the number of words that have been entered into a text area.
Password Generator
Create your own secure passwords that meet certain length and content requirements.
The JavaScript Modulo Bug
The modulo operator in JavaScript does not return the correct value for negative numbers.
Getting Started
Introduction to a series of tutorials on programming with JavaScript
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.
Modern Combo Boxes
HTML doesn't have a tag to produce a combo box but we can use JavaScript to create our own.
Javascript Format and Colour
Unobfuscate, format, and colour-code a Javascript.
Event Listeners
The standard DOM way of listening for events to be triggered.
Using Modal Dialog Box Javascript
A cross browser solution to being able to display a modal dialog box with the content of your choice.
Array Maximum and Minimum Values
Extracting the maximum or minimum value from an array.
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.
Adding Days to a Date
How to make it as easy as possible to add or subtract days from a date.
Writing Cookies
How to write a cookie with Javascript.
Concentration Memory Game with Images Sa...
Put a game of concentration on your site and test your visitor's memory.
Function to Read Parameters Passed Via Q...
How to pass parameters between pages using query strings.
Personality Quiz Script Generator
Create your own multiple question personality quizes with this quiz maker script.
Continuous Text Marquee Code
Want a continuous text marquee for your website? Use this code for a simple marquee.
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.
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.
Documenting your Javascript.
JavaScript Glossary definition for: menubar
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.
Head Scripts and Body Scripts
Where in your web page to put Javascripts.
Mouse Cursor Position
How to determine where the mouse cursor is positioned in the web page when an event is triggered.
The CASE Statement
The Javascript case statement. How to code and use it.
Disable No Right Click Scripts
Disable no right click scripts that globally override the onclick onmousedown or oncontextmenu events.
Passing Parameters
Functions can process different variables each time when you call them using parameters.
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.
Addslashes and Stripslashes
How to use addslash and stripslash with Javascript.
Cross Browser Ticker/Marquee Script RtoL...
Need a simple ticker or marquee for your website? Use this easy script.
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.
setTimeout or setInterval
What is the difference between setTimeout and setInterval?
Last Day of Month
How to find out the number of days in the current month.
Converting IP Addresses
Convert easily betweeen IP address formats 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.
Copy and Paste
How to copy and paste Javascripts.
Credit Card Validation
Validate credit card numbers in forms with this Javascript routine for validating the length and check digits.
Positioning the Popup Window
Changing the size of the popup window.
Two Types of JavaScript
Some JavaScript code just makes your page look a little nicer and more interactive. Other JavaScript provides more essential functionality.
Follow the Mouse Sample
A simple script to get an object to follow the mouse.
Page Events
How to code event handlers to run Javascript code after a page has finished loading or when your visitor leaves the page.
Script Index
A complete alphabetical list of all of the copy/paste scripts.
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.
Cross Browser Ticker/Marquee Example
Add a simple ticker/marquee to your page with this simple Javascript
JavaScript Glossary definition for: Image
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.
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.
Google Maps - Multiple Maps on One Page
How to create and use Google Maps.
Numeric Array Sort
How to sort a numeric array in ascending or descending order.
JavaScript By Example
JavaScript allows you to pass a function to another function as a parameter and then call back to that function from within the function you pass it to.
JavaScript Encryption
Effective encryption using JavaScript
Aborting AJAX
Tutorials on how to use AJAX
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.
Personality Quiz Script Sample
This example quiz was built with the personality quiz generator.
Concentration Memory Game Sample
Want people to spend time on your site? Add this game of concentration and challenge your readers' memory.
Reserved Words
A list of Javascript reserved words and other words with special meanings.
HTML in Javascript
A simple form that will convert HTML source code into Javascript.
Drop Down List Validation
How to validate that an appropriate entry is selected from a drop down list
Polymorphic JavaScript Functions
JavaScript provides the ultimate in polymorphic functions as a function can rewrite itself completely.
Submitting after validation
How to submit the form once it has been validated.
JavaScript Library or Code Yourself
Should you use a JavaScript library or write all the code yourself. Both ways have advantages and disadvantages.
Quiz Maker 1 Body Script
Use this quiz maker script to create multiple-choice questions for your website.
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
More DOM collections on any class you like.
Alternate Analysis Quiz Comment
Create your own multiple question quizes with this quiz maker script.
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.
Image Protection
Let would be thieves steal the wrong image with this alternate way of displaying them.
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).
Null and Undefined
Both null and undefined in JavaScript do not always behave as you might expect them to.
Body Mass Index Calculator HTML
This body mass index calculator uses your height and weight to calculate your BMI.
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.
More DOM collections on any tag you like.
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.
JavaScript and Unicode
JavaScript can work with unicode as well as ASCII.
JavaScript Form Processing
Changes to both JavaScript and HTML have affected the way we should be using JavaScript to validate our forms and will affect it further in the future.
Built-in Functions: alert, confirm, prompt
JavaScript provides built in functions to display dialog boxes

©2016 About.com. All rights reserved.