且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 jQuery 将查询字符串传递给 Ajax 调用?

更新时间:2022-03-01 05:22:02

你不需要提醒那个值,你需要传递它.当前您正在传递字符串 title.

You don't need to alert that value, you need to pass it. Currently you are passing the string title.

    $.ajax({
        url: "/useradminpage?main_id=%s&display=false",
        data: {main_id: this.attr("title")}
        success: function(data) {
        display_false()
        alert(4 - "returned");
        }
    });