How can i validate an input field to ensure that a URL has been entered correctly? ie:
Thanks,
pixel
Thanks,
pixel
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<title></title>
<script type="text/javascript">
function validateData(_myKey){
var bValid = /^http:\/\/www\.([^.])+\.([^.])+$/.test(_myKey);
return bValid;
}
</script>
</head>
<body>
<form>
<input name="mydata" value="[URL unfurl="true"]http://www.google.com">[/URL]
<a href="javascript:alert(validateData(document.forms[0].elements['mydata'].value));">Test</a>
</form>
</body>
</html>