Automatically detect whether the number submitted by the jsp page is a number

December 26, 2009 16:49:16 Website construction comment four hundred and twenty-nine

This is a program I found on the Internet: The article originates from the fallen fish- https://www.duoluodeyu.com/48.html

<input type="text" name="total" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"> The article originates from the fallen fish- https://www.duoluodeyu.com/48.html

After changing the html code of the input box to this way, every character entered or pasted will be detected. If it is not a number, the entered character will be automatically deleted. You can enter a decimal point, that is, you can enter a decimal point. The article originates from the fallen fish- https://www.duoluodeyu.com/48.html

 Summary of common regular expressions Website construction

Summary of common regular expressions

Many friends who do not know much about regular check often look for regular check data on the Internet for a long time, but the results do not meet the requirements. So I recently sorted out some regular expressions commonly used in development and shared them here. Leave a background for yourself, and also give friends a reference
 Baidu Cloud accelerates the increase of domain name prompt: this domain name has used the anti screening service, please change the main domain name to access again Website construction

Baidu Cloud accelerates the increase of domain name prompt: this domain name has used the anti screening service, please change the main domain name to access again

When Baidu Cloud accelerated to add a domain name, it was prompted at the top of the page that this domain name has used the anti screening service, please change the main domain name to access again. This is because your domain name has set anti blocking settings in Baidu Alliance, which also uses Baidu Cloud to accelerate data distribution. To resolve the above
 anonymous

Comment

Anonymous netizens Fill in information

 :?:  :razz:  :sad:  :evil:  :!:  :smile:  :oops:  :grin:  :eek:  :shock:  :???:  :cool:  :lol:  :mad:  :twisted:  :roll:  :wink:  :idea:  :arrow:  :neutral:  :cry:  :mrgreen:

determine