JavaScript Reference/Javascript Methods/toLocaleString

Материал из Web эксперт
Перейти к: навигация, поиск

"toLocaleString()" Example

    
<html>
<body>
<button onclick="var myDate = new Date(); 
alert(myDate.toLocaleString());">
Locale String
</button>
</body>
</html>



"toLocaleString()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |Date                            Number                        |
|                |Object                                                        |
+----------------+--------------------------------------------------------------+



"toLocaleString()" Syntax Parameters and Note

Note:
Converts the object to a locale specific format.
    
Syntax:
    
objectName.toLocaleString()