爲什麼我的代碼循環無限提交而不是echo $ post name test_value?
我該怎麼做?
.............................................. .........................
<form id="fid" method="POST">
<input type="text" name="test_value" value="ON">
<input type="submit" name="submit" value="OK">
</form>
<input type="text" id="check_submit"/>
<script>
var check_submit_val = document.getElementById("check_submit").value;
if(check_submit_val != '')
{
}
else
{
document.getElementById('check_submit').value = '1';
document.createElement('form').submit.call(document.getElementById('fid'));
}
</script>
<?php
if(isset($_POST["submit"]))
{
echo $_POST["test_value"];
}
?>