Demonstrating the toLocaleString() method : toLocaleString « Number Data Type « JavaScript Tutorial






<html>
<head>
<title>Demonstrating the toLocaleString() method</title>
<script type="text/javascript" language="javascript">
<!-- //
function DisplayLocale(){
    var entry1 ;
    entry1 = prompt("Enter a floating point number", "123.123");
    number = new Number();
    number = Number(entry1);
    document.write(number.toLocaleString());
}
// -->
</script>
</head>
<body onload="DisplayLocale()">
</body>
</html>








5.20.toLocaleString
5.20.1.Demonstrating the toLocaleString() method