<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Text/javascript">function Validation () {varval = document.getElementById ("Txtnumber"). Value; varRegu =/^[1-9]\d*$/; //var regu =/^ ([1-9][0-9]*) {1,3}$/; Pro-Test Available//var regu =/^\+? [1-9] [0-9]*$/; Pro-Test Available if(val! ="") { if(!Regu.test (val)) {document.getElementById ("Labresult"). Style.color ="Red"; document.getElementById ("Labresult"). InnerHTML ="validation failed! "; } Else{document.getElementById ("Labresult"). Style.color ="Green"; document.getElementById ("Labresult"). InnerHTML ="Verify Success! "; } } } </script>"Txtnumber"Name="Txtnumber"Type="text"/> <input id="btnvalidation"Name="btnvalidation"Type="Button"Value="Checksum"onclick="validation ()"/>Validation Results:<label id="Labresult"></label></body>JS Regular expression Check nonzero positive integer: ^[1-9]\d*$ or ^ ([1-9][0-9]*) {1,3}$ or ^\+? [1-9] [0-9]*$