|
|
|
สอบถามเรื่อง form submit ไม่ได้ ซึ่ง เป็น form ที่มาจากการแสดงผลของ jquery(ajax.form) |
|
|
|
|
|
|
|
Code (PHP)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test POST Jquery </title>
<meta name="Generator" content="EditPlus">
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<b>Please filled in the blank</b><br />
Your first name: <input type="text" id="fname" /> Last name: <input type="text" id="lname" />
<br /><br />
<input type="button" id="saveResult" value="Save All Data" />
<br />
<div id="displayResult" style="padding:10px;border:2px solid darkgray;overflow:scroll;height:100px;">The Result will be appear here!</div>
<script>
$("#saveResult").click(function(){
var firstname = $("#fname").val(),
lastname = $("#lname").val() ;
$.post("saveresult.php", {FName:firstname,LName:lastname} , function(data) {
$('#displayResult').append(data);
//$('#displayResult').html(data);
});
});
</script>
</body>
</html>
saveresult.php
Code (PHP)
<?php
print_r($_POST);
?>
|
|
|
|
|
Date :
2012-04-30 10:01:18 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2012-08-05 11:37:04 |
By :
xdzxdbz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|