How to get current URL?

 Posted by vishalneeraj-24503 on 12/19/2013 | Category: JavaScript Interview questions | Views: 1285 | Points: 40
Answer:

With the help of location.href property we can get current URL.

For Example:-

function get_url()
{
alert(location.href);
}

It will show the page URL.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response