AJAX问题-新手

I have a HTML TEXT BOX in one of my webpage, there is not submit button.

<form>
<label>Website URL: </label>
<input name="" type="text" class="textfield" />
</form>

The text box is used to enter url, i need to do validation of this textbox using AJAX.So for example if someone enters url and hit enter the URL will appear below the text box and the text box will be emptied again. It will only do this if it is a validly formed url, for example if someone writes ttjkl.145 this will not do anything as it is not a valid url. It will however accept any variations that are valid such as http://www.url.com or www.url.co.uk and url.com.au. And it will remove anything after the end of the country code for example if the person types www.abc.net/dlkjfk then only www.abc.net will be accepted

What you need has nothing to do with Ajax. JavaScript alone can do what you need.

The answer you seek already exists:

URL regex validation

Help me validate url which should even accept .me domains

how can i validate a url in javascript using regular expression