
More JavaScript Messages
Adding Commas | JavaScript Alert | Rotate Banner Ads | Sort Data By Field | Tip of The Day | Continuously Change | Message On Date | Editable Select Menu | Connected To Mouse | Text Fader | Highlighted Search | Text Box Messages | Text Glowing Border | Hover Text Colors | Image Link Description | Information Box | Short Description | Jitter Text | Orbiting 3-D Message | Message In A Box | A Trail Of Cursors | Drags A Message | Neon Style Method | Dialup Phone Number | Print Page Button | Automatic Print Page | Simpliest Fast Alert | Quote Of The Day | Rainbow Color Text | Random Name | Random Set Range | A Random Joke | Rotates Message Menu | Random Nerd Quotes | Quotes Generator | Murphys Laws | Random Puns | Random Quips | Random Sentence | JavaScript Error Report | Marquee Message | Characters From String | Teletype Scroller | Text Highlighter | Rotates Messages | Text Ripple | Time Message | Flash Style Intro | Advice From Zen
Description
Use Javascript to modify numbers by adding commas after every third digit. For example, 123456789 is converted to 123,456,789. The script example shows this script as used on numbers of various sizes....View A Script Demo
Use Javascript to modify numbers by adding commas after every third digit. For example, 123456789 is converted to 123,456,789. The script example shows this script as used on numbers of various sizes....View A Script Demo
Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Martin Webb -->
<!-- Web Site: http://www.irt.org -->
<!-- Begin
function Comma(number) {
number = '' + number;
if (number.length > 3) {
var mod = number.length % 3;
var output = (mod > 0 ? (number.substring(0,mod)) : '');
for (i=0 ; i < Math.floor(number.length / 3); i++) {
if ((mod == 0) && (i == 0))
output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
else
output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
}
return (output);
}
else return number;
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg >
<center><BR><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.write(Comma(1)+'<BR>');
document.write(Comma(12)+'<BR>');
document.write(Comma(123)+'<BR>');
document.write(Comma(1234)+'<BR>');
document.write(Comma(12345)+'<BR>');
document.write(Comma(123456)+'<BR>');
document.write(Comma(1234567)+'<BR>');
document.write(Comma(12345678)+'<BR>');
document.write(Comma(123456789)+'<BR>');
document.write(Comma(1234567890)+'<BR>');
// End -->
</script>
</center>
</BODY>
</HTML>
<HTML>
<HEAD>
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Martin Webb -->
<!-- Web Site: http://www.irt.org -->
<!-- Begin
function Comma(number) {
number = '' + number;
if (number.length > 3) {
var mod = number.length % 3;
var output = (mod > 0 ? (number.substring(0,mod)) : '');
for (i=0 ; i < Math.floor(number.length / 3); i++) {
if ((mod == 0) && (i == 0))
output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
else
output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
}
return (output);
}
else return number;
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg >
<center><BR><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.write(Comma(1)+'<BR>');
document.write(Comma(12)+'<BR>');
document.write(Comma(123)+'<BR>');
document.write(Comma(1234)+'<BR>');
document.write(Comma(12345)+'<BR>');
document.write(Comma(123456)+'<BR>');
document.write(Comma(1234567)+'<BR>');
document.write(Comma(12345678)+'<BR>');
document.write(Comma(123456789)+'<BR>');
document.write(Comma(1234567890)+'<BR>');
// End -->
</script>
</center>
</BODY>
</HTML>
If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail

