使用jqueryajax

时间:2017-05-29 01:36:19

标签: javascript php jquery ajax

我只知道在使用href时如何传递ID,但使用ajax是url:xxx.php
所以我不知道如何传递和识别ajax以及如何接收它。

var grid = $("#employee_grid").bootgrid({
    ajax: true,
    rowSelect: true,
    post: function ()
    {
        /* To accumulate custom parameter with the request object */
        return 
        {
            id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
        };
    },

    url: "responseX.php?id=<?php echo $some_data ?>",//I know this row were wrong,please told me answer if you know

    formatters: 
        {
            "commands": function(column, row)
            {
                return "<a href=\"cus_details.php?id="+row.TICKET_ID+"&tgrp="+ row.AGENT_CODE_STAFF_ID+" \"><button data-row-id=\"" + row.TICKET_ID + "\">Details</button></a>";
            }
        }
}

0 个答案:

没有答案