format.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Format NumberBox - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Format NumberBox</h2>
  14. <p>Number formatting is the ability to control how a number is displayed.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  17. <div style="margin-bottom:20px">
  18. <input class="easyui-numberbox" value="1234567.89" data-options="label:'Number in the United States',labelPosition:'top',precision:2,groupSeparator:',',width:'100%'">
  19. </div>
  20. <div style="margin-bottom:20px">
  21. <input class="easyui-numberbox" value="1234567.89" data-options="label:'Number in France',labelPosition:'top',precision:2,groupSeparator:' ',decimalSeparator:',',width:'100%'">
  22. </div>
  23. <div style="margin-bottom:20px">
  24. <input class="easyui-numberbox" value="1234567.89" data-options="label:'Currency:USD',labelPosition:'top',precision:2,groupSeparator:',',decimalSeparator:'.',prefix:'$',width:'100%'">
  25. </div>
  26. <div style="margin-bottom:20px">
  27. <input class="easyui-numberbox" value="1234567.89" data-options="label:'Currency:EUR',labelPosition:'top',precision:2,groupSeparator:',',decimalSeparator:' ',prefix:'€',width:'100%'">
  28. </div>
  29. <div style="margin-bottom:20px">
  30. <input class="easyui-numberbox" value="1234567.89" data-options="label:'Currency:EUR',labelPosition:'top',precision:2,groupSeparator:' ',decimalSeparator:',',suffix:'€',width:'100%'">
  31. </div>
  32. </div>
  33. </body>
  34. </html>