1. Home
  2. Computing & Technology
  3. JavaScript

Animation

There are a variety of different types of animation that you can incorporate into your web page. In this series of tutorials we look at the basics of getting one or more elements to appear and disappear and to also move around the screen.

Marquees/Scrollers

JavaScript Spotlight10

Stephen's JavaScript Blog

Splitting Matches

Sunday November 22, 2009
The fourth tutorial on "Regular Expressions" shows you how to split a string into several parts by matching it with a regular expression.

Splitting Matches

Convert to Roman Numerals

Saturday November 21, 2009
JavaScript can display the answer in roman numerals

Sometimes displaying a number on your web page as a normal number just doesn't look right. Sometimes it may be more appropriate to display the number on your web page using Roman Numerals instead. This simple Javascript function can handle the conversion of any number between 1 and 3999 into the roman numeral equivalent for you.

Convert to Roman Numerals

Numbers to Words

Friday November 20, 2009
Convert numbers to Words with JavaScript.

JavaScript does an excellent job of being able to manipulate numbers and even provides some quite advanced mathematical functions. What happens though when you want to print out the result of that manipulation in words rather than numbers? You use a simple function that will do the conversion for you.

Numbers to Words

Formatting Numbers

Thursday November 19, 2009
The format JavaScript wants to work with isn't always the same as the format you want to display the result in.

To be able to process numbers in JavaScript they must contain nothing except digits and perhaps a period as the decimal point and a dash for a minus sign. If you include anything else then Javascript treats it as a text string instead of a number and so will not allow you to use it in calculations. What would be useful though is a way to take those numbers and apply some formatting to them (comma separators, currency etc.) before displaying the result in our web page. Since this may need to be done for several numbers it is best done using a function and to save you the trouble of working out the JavaScript to do this I have written this function for you.Now updated to correctly handle numbers between 1 and -1.

Formatting Numbers
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.