我需要在文本字段中使用jquery正则表达式输入0.00到100.00。我是新的正则表达式。请帮我,我该怎么做? 我不允许输入超过100.00或负值。使用jquery正则表达式在文本字段中输入0到100
var regex = "^\$(\d{1,3},?(\d{3},?)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{2})?)$|^\d{1,2}(\.\d{1,2})? *%$|^100%$";
<input type="text" class="count">
我如何在文本框中使用正则表达式。我只想在小数点后只允许两个数字。示例(0.00和100.00或99.99)像这样。
你为什么要在这里使用正则表达式? – gurvinder372
代码非常少。没有正则表达式我该怎么办?我想要提到的所有条件。 –
http://stackoverflow.com/questions/13413320/javascript-to-accept-only-numbers-between-0-to-255-range – gurvinder372