我需要將表單值從一個頁面發送到另一個頁面,並從該頁面發送到第三個頁面。我需要第三頁第一頁的表單值。我該怎麼做?如何記住不同頁面上的表單值?
我有將表單值傳遞到下一頁的代碼。我怎樣才能將相同的表單值發送到第三頁?
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
// we will add our javascript code here
$(document).ready(function(){
$("#ajax-contact-form").submit(function(){
var str = $(this).serialize();
$.ajax({
type: "POST",
url: "contact.php",
data: str,
success: function(msg){
$("#note").ajaxComplete(function(event, request, settings){
if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
window.location.href = "http://www.google.com";
$("#fields").hide();
}
else
{
result = msg;
}
$(this).html(result);
});
}
});
return false;
});
});
</script>
謝謝...我如何閱讀當我使用GET第三頁中的值?任何例子會很好 – Prady 2010-09-26 13:18:53
看看這個:http://stackoverflow.com/questions/1352214/serialize-unserialize-in-jquery – 2010-09-26 13:25:28
我已更新後,請檢查它 – 2010-09-26 13:26:02