28
document.location contains information about the URL, and document.location.search contains the query string, e.g. ?foo=bar&spam=eggs. As for testing its presence, how about:
if(document.location.search.length) {
// query string exists
} else {
// no query string exists
}
No jQuery required :o
I would think you could use the javascript match operator.
var url = window.location.search;
if (url.match("your string").length > 0) {
}