<script type="text/javascript">
function chkform(form)
{
re =/^[a-zA-Z]+$/
if(!re.test(form.txtname.value))
{
alert("Only Character Allowed ");
form.txtname.focus();
return false;
}
</script>
<form name="f1" method="post" style="margin-left: 500px;">
<input type="text" name="txtname" placeholder="Enter Name" />
</form>
function chkform(form)
{
re =/^[a-zA-Z]+$/
if(!re.test(form.txtname.value))
{
alert("Only Character Allowed ");
form.txtname.focus();
return false;
}
</script>
<form name="f1" method="post" style="margin-left: 500px;">
<input type="text" name="txtname" placeholder="Enter Name" />
</form>
No comments:
Post a Comment