1 <html> 2 <head> 3 <meta charset="UTF-8"> 4 <title>document</title> 5 </head> 6 <body> 7 <form> 8 <input type="text" autocomplete="off" id="price" autofocus="autofocus" onkeyup="value=value.replace(/[^\d^\.]+/g,'')">> 9 </form> 10 </body> 11 </html>
标签:11,数字,小数点,js,正则,输入 From: https://www.cnblogs.com/mo3408/p/16919413.html