<html> <head>
</head> <script language="javascript">
function isURL(s) { var regexp = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/; alert(regexp.test(s)); } </script>
<body> <form>
<input type="text" name="url" size="20" id="url"/>
<input type="button" value="Validate" onClick="javascript:isURL(document.getElementById('url').value);"/>
</form> </body></html>
No comments:
Post a Comment