Give input number box default value and add pattern to limit number format - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input number

Description

Give input number box default value and add pattern to limit number format

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from  www. j  a  v a  2s .c o m-->
 <body> 
  <input value="1,2323.23" type="text" pattern="^\\$?(([1-9](\\d*|\\d{0,2}(,\\d{3})*))|0)(\\.\\d{1,2})?$">  
 </body>
</html>

Related Tutorials