home / experts / javascript / column59 |
|
Formatting Data by Local SettingsInternet Explorer 5.5 updated the
and by the Time tab:
If we define
then the command
Notice how the format is as specified in the Region Settings above. When printing a number, the format is determined by the Number tab:
Assume that:
Then the simple printout
Notice how the settings in the Number tab above are reflected in the printout. The specification of the number of digits after the decimal place (2) is a good example. Let's see now how arrays are printed out. Suppose we have the following JavaScript statement that defines an array:
The statement
Notice how the elements are separated by commas, as specified in the Number tab above. Let's change the separator character to a $ sign. The alert box will look like this:
Next: How to push and pop array elements |
Produced by Yehuda Shiran and Tomer Shiran
Created: March 14, 2000
Revised: April 26, 2000
URL: http://www.webreference.com/js/column59/3.html