gpt4 book ai didi

jquery - 使查询字符串可见

转载 作者:行者123 更新时间:2023-12-01 07:32:33 25 4
gpt4 key购买 nike

我正在这样做:

$.ajax({
type: 'GET',
url: this.href,
async: true,
data: $('form').first().serialize(),
beforeSend: function() {
$.blockUI({ message: 'Please wait ...' });
},
complete: function() {
$.unblockUI();
},
success: function(result) {
$("#grid").replaceWith($("#grid", result));
},
dataType: "text"
});

是否可以显示从表单获取的查询字符串,以便用户可以存储链接?

谢谢。

基督教

最佳答案

当然,只需预先计算序列化形式:

var the_data = $('form').first().serialize();
$.ajax({
type : 'GET',
url : this.href,
async : true,
data : the_data,
beforeSend: function() {
$.blockUI({ message: 'Please wait ...' });
},
complete : function() {
$.unblockUI();
},
success : function(result) {
$("#grid").replaceWith($("#grid", result));

// Based on your comment, I am alerting `the data` to clarify
// the example. Obviously you'll want to display this on the page
// rather than using an alert.
alert(the_data);
},
dataType : "text"
});

关于jquery - 使查询字符串可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4947029/

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