You are here: irt.org | FAQ | JavaScript | Link | Q992 [ previous next ]
If the URL is something like:
http://www.irt.org/?number=5
Then the following will create a JavaScript variable called number, with the value of 5:
<script language="JavaScript"><!-- if (location.search.length > 0) eval('var ' + location.search.substring(1)); //--></script>