<!-- 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/12/4 18:16,
3.129.63.252: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://sxlist.com/Techref/language/JAVA/script/definitive/examples/13.2.txt"> language JAVA script definitive examples 13</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.