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?
Thanks,
Jeff
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<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]);
elem.appendChild(text);
body.appendChild(elem);
}
}
</script>
</head>
<body onload="showProps()">
<p>Chapter 9 Example</p>
</body>
</html>