Jak zdobyć paramater HTML w JS

function hp(a){
    var url = new URL(document.URL);
    return url.searchParams.get(a);
}
Ang is wolf dude (ang)