<!-- This example is from the book _JavaScript: The Definitive Guide_.     -->
<!-- Written by David Flanagan.  Copyright (c) 1996 O'Reilly & Associates. -->
<!-- This example is provided WITHOUT WARRANTY either expressed or implied.-->
<!-- You may study, use, modify, and distribute it for any purpose.        -->
<SCRIPT LANGUAGE="JavaScript1.1">
// location.search has a question mark at the beginning, 
// so we call substring() to get rid of it.
var argstr = location.search.substring(1, location.search.length)

// Assuming that the arguments are passed in a comma-separated list, we
// can break them into an array with this line.  (Using an ampersand to
// separate arguments is another common URL convention.)
var args = argstr.split(',');

// Now we can use the arguments however we want.  This example just 
// prints them out.  We use the unescape() function in case the arguments
// include escaped characters (like spaces and punctuation) that are 
// illegal in URLs.  (See escape() and unescape() functions for details.)
for (var i = 0; i < args.length; i++)
    document.write(unescape(args[i]) + "<BR>");
</SCRIPT>