Skip to content

Instantly share code, notes, and snippets.

@motsu0
Last active September 20, 2020 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motsu0/6b5a4a9507c47e0ed62b83a0dc3381c3 to your computer and use it in GitHub Desktop.
Save motsu0/6b5a4a9507c47e0ed62b83a0dc3381c3 to your computer and use it in GitHub Desktop.
function get_params2(){
const params = (new URL(document.location)).searchParams;
output_query2(params);
}
function output_query2(params){
output[1].textContent = '';
let str = '';
for(key of params.keys()){
str += esc_html(key) +'='+ esc_html(params.get(key)) + '<br>';
}
output[1].innerHTML = str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment