十进制数字的javascript验证 [英] javascript validation for decimal numbers
本文介绍了十进制数字的javascript验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是小数点前的18位数字和小数点后的2位数字应显示在文本框中.
使用javascript
My problem is 18 digits before decimal point and 2 digits after decimal point should display in textbox.
using javascript
推荐答案
看看: ^ ]
最好的问候
Espen Harlinn
Have a look at: 10+ Useful JavaScript Regular Expression Functions to improve your web applications efficiency[^]
Best regards
Espen Harlinn
您可以使用regular expression
与文本框中输入的数字的精确比例和精度进行匹配.
检查这些链接.
检查十进制数字 [简单的正则表达式,精度为十进制2? [使用RegEx进行JavaScript小数位数限制 [ http://www.regular-expressions.info/ [
Hi,
you can use theregular expression
for match with exact scale and precision of the number entered in th textbox.
check these links.
checking for decimal numbers[^]
Simple regular expression for a decimal with a precision of 2?[^]
JavaScript Decimal Place Restriction With RegEx[^]
for more on regular expression refer below link.
http://www.regular-expressions.info/[^]
hope it helps.
这篇关于十进制数字的javascript验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文