the javascript code as below...how can I pass x to php?And there is not any button.
function f(){
var x = document.getElementById("point").innerHTML;
}
And if I pass x to the php file,how can I receive it?
the javascript code as below...how can I pass x to php?And there is not any button.
function f(){
var x = document.getElementById("point").innerHTML;
}
And if I pass x to the php file,how can I receive it?
Try this one,
function f(){
var x = document.getElementById("point").innerHTML;
window.location.href = 'page.php?point='+x;
}
And in page page.php
try this,
$point = $_GET["point"];
Try This out:
function myFunction() {var javascriptVariable =document.getElementById("point").innerHTML;window.location.href = "myphpfile.php?name=" + javascriptVariable; }
On your myphpfile.php you can use $_GET['name'] after your javascript was executed.