所有我想要做的是當我點擊提交我想要所有表單數據被髮送到process.php ...然後在process.php我想回顯出POST數據...然後替換一切結果div來什麼在process.php做...jQuery POST表單數據
<script type="text/javascript">
$(document).ready(function(){
$("#myform").submit(function() {
$.ajax({
type: "POST",
dataType: "html",
cache: false,
url: "process.php",
success: function(data){
$("#results").html(data);
}
});
return false;
});
//$("#myform").submit(function() {
//$('#results').html("yay");
//}
// });
//});
});
</script>
<form name="myform" id="myform" action="" method="POST">
<!-- The Name form field -->
<label for="name" id="name_label">zoom</label>
<input type="text" name="zoom" id="zoom" size="30" value=""/>
<br>
</select>
<!-- The Submit button -->
<input type="submit" name="submit" value="Submit">
</form>
<!-- FORM END ---------------------------------------- -->
<!-- RESULTS START ---------------------------------------- -->
<div id="results">nooooooo<?PHP $_SESSION[''] ?><div>
<!-- <input type="image" name="mapcoords" border="0" src="mapgen.php"> ---- -->
<!-- RESULTS END ---------------------------------------- -->
那麼,有什麼問題? – Nacho 2011-04-24 19:53:41
你的代碼似乎這樣做(冷檢)。問題是什麼? – Halcyon 2011-04-24 19:54:05
這是什麼問題? – 2011-04-24 20:04:12