<div class="codetitle"> <span><a style="CURSOR: pointer" data="88253" class="copybut" id="copybut88253" onclick="doCopy('code88253')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code88253"> <br><html><br><head><br>< ;title> Determine whether it is a number or a space <br><script type="text/javascript"><br>function check_num() //Create function <br>{<br> var Num=document.getElementById("num").value; //Get Value (id=num) <br> if(isNaN(Num) || Num=="" || Num.substring(0,0)==0) //Note that the substring function is used to determine spaces <br> { <br> alert("Please do not enter non-digits");<br> return false; script><br></head><br><body><br>Please enter a number: <input type="text" id="num" name="num" value=""><br><input type="submit" value="Submit" o~n~c~l~i~c~k~="check_num"> //This is actually onclick but it is not allowed to write <br></ body><br></html><br><br> </div>