Location search property
Definition and Usage
(Part of the question mark? After) search a property is readable and writable string sets or returns the current query portion of the URL.
grammar
location.search
Browser Support
All major browsers support attribute search
Examples
Examples
Returns the query part of the URL. Suppose the current URL is http://www.w3big.com/submit.htm?email=someone@ example.com:
<script>
document.write(location.search);
</script>
document.write(location.search);
</script>
Examples of the above output:
Location Object