Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pass variable to another page in js

function valueSender()
{
var a=999;
localStorage.setItem("myValue", a);
window.location.href="index.html";
}

var b = localStorage.getItem("myValue");
alert("The Value Received is " + b);
var resetValue =0;
localStorage.setItem("myValue", resetValue);
Source by www.howtocodeschool.com #
 
PREVIOUS NEXT
Tagged: #pass #variable #page #js
ADD COMMENT
Topic
Name
3+7 =