javascript - To get path name with url values in jquery -
this example url.
http://stackoverflow.com/questions/ask?a=1&b=2
question: need fetch path name along url values this
/questions/ask?a=1&b=2need jquery or javascript solution
var url = document.createelement('a'); url.href = 'http://stackoverflow.com/questions/ask?a=1&b=2'; alert(url.pathname + url.search);
Comments
Post a Comment