$(function(){ Limit the text box to only numbers*/ $(".NumText").keyup(function(){ ^0/g,'')); . .replace(/D|^0/g,'')); *JQuery limits the text box to only numbers and decimal points*/ $(".NumDecText").keyup(function(){ (/[^0-9.]/g,'')); (this).val().replace(/[^0-9.]/g,'')); }).css("ime-mode", "disabled"); //CSS setting input Method not available
Then add the class name to the text box that needs to be verified, similar to the following:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn