153
rated 0 times
[
158]
[
5]
/ answers: 1 / hits: 20520
/ 11 Years ago, mon, november 25, 2013, 12:00:00
URL:
http://testwebsite.com/page1.aspx#page/1
I want to split the URL upto aspx using jQuery or Javascript, meant I want to split the URL so that it should be:
http://testwebsite.com/page1.aspx
I have tried this code;
var url=document.URL;
var arr=url.split('#');
var myoutput=arr[0];
Is it the right way to split? Is there any other way which is reliable and better?
More From » jquery