This is an example URL.
http://stackoverflow.com/questions/ask?a=1&b=2
question : do I need to get the path name along with URL values such as
/ questions / ask? a = 1 & b = 2
var url = document.createElement('a'); url.href = 'http://stackoverflow.com/questions/ask?a=1&b=2'; alert(url.pathname + url.search);
Demo: http://jsfiddle.net/karim79/8XYYj/
Source: https://habr.com/ru/post/1778056/More articles:SHA1 Hash on a hexadecimal string - javaService Timer Notification - androidСвязывание события click to td vs table - performanceHow to read a string (file) into an array in java - javaShould I use Python for a little CRM? If not, is there another platform? - pythonRegular Expression - Avoidance of Characters - c #TextView Template - androidHow to upload files from perforce to a place other than the workspace? - perforceandroid and advertising - androidMySQL definition explanation int - definitionAll Articles