datatables如何通过html5数据属性将参数传递到服务器端?

时间:2020-01-10 17:51:12

标签: jquery datatables

    <table class="table table-striped- table-bordered table-hover table-checkable table-data" id="table-product"
    data-ajax="../../sql/common/get-product-info.php">
                                <thead>
                                <tr>
                                                <th data-data="lanID" style="min-width:50px" class="text-center lan-id">ID</th>
                                                <th data-data="lanID" style="min-width:16rem" class="lan-product-name">Product Name</th>
                                                <th data-data="lanID" style="min-width:6rem" class="text-right lan-sold">Sold</th>
                                                <th data-data="lanID" style="min-width:6rem" class="text-right lan-price">Price</th>
                                                <th data-data="lanID" style="min-width:6rem" class="text-right lan-cost">Cost</th>
                                                <th data-data="lanID" style="min-width:6rem" class="text-right lan-profit">Profit</th>
                                                <th data-data="lanID" style="min-width:6rem" class="text-center lan-status">Status</th>
                                                <th data-data="lanID" style="min-width:8rem" class="lan-reg-date">Reg Date</th>
                                                <th data-data="lanID" style="min-width:7rem" class="lan-reg-time" data-visible="false">Reg Time</th>
                                                <th data-data="lanID" style="min-width:6rem" class="lan-action">Action</th>
                                    </tr>
                    </thead>


                </table>

我dn想要使用jQuery来传递参数,我想写像data-ajax ='php file'data-param ='request_param()'的方法,然后返回函数中的params值。我该怎么办?

0 个答案:

没有答案