gpt4 book ai didi

javascript - 有没有办法使 JQuery post 数组成为动态的?

转载 作者:行者123 更新时间:2023-11-30 15:26:09 25 4
gpt4 key购买 nike

<分区>

有没有办法让 var changes 成为一个可以放入下面这个数组中的变量?

    $(".SUBMIT").on("click", function(){
var name = $("#idvalue").val();
var changes = "thischanges"; // this variable changes the key
$.post("ajax_process.php",{ changes: name}, function(data){
alert(data);
});
});// END submit

$_POST['changes']; // will be what sends through, is there a way to make it the variable every time?

这与 key, value 类似,但创建的键随变量而变化。

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