How do I change the URL

Hi guys,

In my book I’m going thru, there is the example below to demonstate the location property; After I run this code, the author wants me to “modify the URL that I use to call the page, to add some query string parameter/value, such as ‘name=Jeff and country = US’, and run the code again”.
He doesn’t tell me how to modify the URL, though, so how do I modify the URL?


    <title>Location, Location, Location</title>
    <script type = "text/javascript" >
        function showProps() {
            var body = document.getElementsByTagName("body")[0];
            for (var prop in location) {
                var elem = document.createElement("p");
                var text = document.createTextNode(prop + ": " + location[prop]);
<body onload="showProps()">
<p>Chapter 9 Example</p>

There’s no coding involved, all it means is to append some parameters to the URL in the address bar.

To load the page you may type: mypage.htm

Instead you may add parameters: mypage.htm?partNum=83453&desc=bolt

The purpose being presumably to see the search property change in the display generated.

oh great…that was simple enough! Thanks Ali