Dear Coders
I have following codes
<html>
<head>
<body>
<center>
<script language="JavaScript">
function checkpostal(){
var re=/^\D{A-Z}$/
if (myform.myinput.value.search(re)==-1)
{
alert("Good")
}else{
alert("Bad")
}
}
</script>
<form name="myform">
<input type="text" name="myinput" size=15>
<input type="button" onClick="checkpostal()" value="check">
</form>
</center>
</body>
</html>
With Onclick, I want to test input through regular expression
If entered values is between a-z or A-Z then
it must display
alert("Good")
else
alert("Bad")
Please help