Blog Archives

Validating url using javascript

Some times we might need to check if the url entered by the user in the text box is a valid one or not. Here is a sample code to check that. <html> <head> <script> function checkUrl() { var theUrl=document.getElementById(‘url’).value;

Posted in Javascript Tagged with: ,