Wednesday, 15 June 2011

asp.net - How to get starting of the URL using javascript? -



asp.net - How to get starting of the URL using javascript? -

i want starting part of url. have url http://abc.com/hdwedding2013/flipbook1.aspx?bookid=24&height=500 here want : http://abc.com/hdwedding2013/ or http://abc.com/ . have tried next illustration giving url :

alert( document.url );

to abc.com utilize `location.origin'

refer: location

as application base of operations path, ( http://abc.com/hdwedding2013/), have utilize asp.net code

alert('<%=resolveurl("~") %>');

javascript asp.net url

No comments:

Post a Comment