How to save javascript variable in php variable??
<body onload='window.setInterval("timeHere()", 100)' onunload="sayTime()">
</body>
<script>
var time=1;
function timeHere() {
time = time + 1;
finalTime = time / 10;
}
function sayTime() {
finalTime = time / 10;
//return finalTime;
alert("Thank you for coming to my site! \n You have been here " + finalTime + " seconds!");
}
</script>
How to save finalTime in php variable like $time??
</body>
<script>
var time=1;
function timeHere() {
time = time + 1;
finalTime = time / 10;
}
function sayTime() {
finalTime = time / 10;
//return finalTime;
alert("Thank you for coming to my site! \n You have been here " + finalTime + " seconds!");
}
</script>
How to save finalTime in php variable like $time??
Aamit
December 24,