gpt4 book ai didi

php - 如何记住不同页面的表单值?

转载 作者:行者123 更新时间:2023-11-30 13:38:01 25 4
gpt4 key购买 nike

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

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

<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";

关于php - 如何记住不同页面的表单值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3797903/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com