initial import
[vuplus_webkit] / Source / WebCore / manual-tests / input-number-localization.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Number type input shows and accepts localized numbers</title>
5 <style>
6 :invalid {
7   border-color: red;
8   -webkit-box-shadow: 4px 4px 8px #ff8888;
9 }
10 </style>
11 </head>
12 <body>
13 <div id="console"></div>
14
15 <p>Output test: The following text field should have a localized representation for "-1234.5678".
16 e.g. "-1234.5678" for en_US locale, "-1234,5678" for fr_FR locale. The thousand separator is
17 currently off.</p>
18 <div><input type=number value="-1234.5678" step=any></div>
19
20 <p>Input test: Type a localized representation of a number (e.g. -1,234.5678 for en_US locale,
21 -1.234,5678 for fr_FR locale) into the following text field.
22 You'll see an equivalent number in the standard format on the bottom of the text field.</p>
23 <div><input type=number id=target step=any oninput="handleInput()"></div>
24 <div>Standard format: <output id=output></output></div>
25
26 <script>
27 function handleInput() {
28   document.getElementById('output').value = document.getElementById('target').value;
29 }
30 </script>
31 </body>
32 </html>