<!-- 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 =index.html 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>
file: /Techref/language/JAVA/SCRIPT/definitive/examples/13.2.txt, 1KB, , updated: 1997/4/4 10:59, local time: 2024/11/28 09:38,
18.116.14.48:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/language/JAVA/SCRIPT/definitive/examples/13.2.txt"> language JAVA SCRIPT definitive examples 13</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.