Passing parameters to a page

JavaScript FAQ | Navigation Enhancements  

Question: Can I pass parameters (data values) from one my page to another?

Answer: Yes, you can pass a parameter to another page in several different ways:

Here is a simple demo illustrating all these methods for passing parameters. The value to be passed is the string
'It_worked'
. When you click on the button below, the
onClick
JavaScript event handler is invoked. It stores the parameter (1) in a cookie named
parm_value
, (2) in a top-level variable
top.parm_value
, and (3) in the
top.name
property. Then the script directs your browser to the URL
parm_get.htm
appended with a query string containing the URL-encoded parameter value.

Copyright © 1996-2018, JavascriptFAQ.net.