如何將java腳本提示信息msg變量值傳遞給php。如何通過java腳本提示msg變量值到php?
<?php
echo '<script type="text/javascript">
var msg = window.prompt("Input a value", ""); alert(msg);
</script>';
//then need to use input value to php
echo $value; //how to get JS value to here?
?>
或者是否有任何其他方式來獲得PHP提示按摩輸入值?
您需要使用AJAX爲通數據從JavaScript到PHP – Jobayer 2014-10-28 06:39:41