<HTML> <HEAD> <TITLE> </TITLE> <script type="text/javascript"> function formValidation(){ if (validateAllSame()){ } return false; } function validateAllSame(){ var y=document.form1.number.value; var x = y.substr(0,2); for(int i=0;i<=y.length;i+=2){ if(y[i] == x){ } return false; alert("wrong number"); } return true; } </script> </HEAD> <BODY> <form name ="form1" action="" onsubmit="return formValidation()"> Number:<input type="text" name="number" value=""> <input type="submit" value="Done"> </form> </BODY> </HTML>
([a-zA-Z0-9]+?)\1+
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)