How to check if a page is valid or not using javascript
I have a link 

> Blockquote

<a href="http://www.example.com">Hello</a>.

> Blockquote

when i click the link it should check the page is valid or not.If valid goes to that page(www.example.com) or if the page is invalid redirect to another Page.
How to check if a page is valid or not using javascript
===

I have a link 

> Blockquote

<a href="http://www.example.com">Hello</a>.

> Blockquote

when i click the link it should check the page is valid or not.If valid goes to that page(www.example.com) or if the page is invalid redirect to another Page.