How to get only Port from URL?

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

Use port proprty of location to get port from Location or URL.

For Example:-

function get_url_port()

{
alert(location.port);
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response