How can I check if the query string contains a q= in it using JavaScript or jQuery?
q=
this function help you to get parameter from URL in JS
function getQuery(q) { return (window.location.search.match(new RegExp('[?&]' + q + '=([^&]+)')) || [, null])[1]; }