Location.search
In this chapter you will learn:
search property
The search
property can be set with new values that alter the current URL.
assume starting at http://www.java2s.com/index.htm
location.search = "?q=javascript";
changes URL to "http://www.java2s.com/index.htm?q=javascript"
<!DOCTYPE HTML> /*jav a 2 s . c om*/
<html>
<body>
<script>
location.search = "?q=javascript";
</script>
</body>
</html>
Next chapter...
What you will learn in the next chapter: