我需要将表单值从一页发送到另一页,再从该页发送到第三页。我需要第三页第一页中的表单值。我该怎么做?

我有将表单值传输到下一页的代码。如何将相同的表单值发送到第三页?

<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

window.location.href = "http://yourdoamin?value= serialize text variable";



Get URL parameters & values with jQuery

09-25 12:18