0
在我的代碼中,$ vl var是空的。爲什麼?將var j從JS傳遞到PHP
JS;
<script>
$(document).ready(function(e) {
var vl = "ciao";
});
</script>
PHP:
<?PHP
$vl= "<script>document.write(vl); </script>";
echo "bariabile: ".$vl;
?>
[從JavaScript以PHP通行證值](的可能的複製http://stackoverflow.com/questions/19327607 /傳遞值從 - 的JavaScript到PHP) –