I want to send a variable to another JavaScript page using the onclick button. I can send and see in the address bar its value. The problem is receiving on the second page. Example:
var object=3;
function btn_onclick()
{
window.location.href = "page.htm?object="+object;
}
<input type=button value=pass onclick="return btn_onclick()" />
Page 2 to receive:
<script type="text/javascript">
alert(object);
</script>