<html>
<head>
<script>
function validateContent(evt)
{
var pattern = /^\w[a-zA-Z@#0-9.]*$/;
if(evt.value.search(pattern) == -1)
{
alert('Space not Allowed');
return false;
}
}
</script>
</head>
<body>
<input type='text' onkeyup='return validateContent(this);' />
</body>
</html>
No comments:
Post a Comment