Method 1,
function CheckForm() {
if (document.form1.trainingName.value==""){
; );
return false; 🎜> Copy the code
The code is as follows:
function CheckForm() {
var classLevel = $("#classLevel").val(); var re = /^[1-9][0-9]*$/;
if(!re.test( classLevel)&&classLevel.length>0){
alert("Please enter an integer greater than zero!"); > } }
Statement: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