Answers for "url pathname "*" js means"

0

js url pathname

var getLocation = function(href) {
    var l = document.createElement("a");
    l.href = href;
    return l;
};
var l = getLocation("http://example.com/path");
console.debug(l.hostname)
>> "example.com"
console.debug(l.pathname)
>> "/path"
Posted by: Guest on January-27-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language