小编Jan*_* dl的帖子

Jquery数据表如何获取被点击的行数据

我有 jquerydatatable及其根据日期分组。我想在单击组标题时添加新的事件操作。但我无法获取点击的组数据。如何获取点击的分组数据。我使用下面的代码,仍然无法获取clicked组数据。

 $(document).ready(function(){
        var otable;
        otable = $('#data').DataTable({
            "bProcessing":true,
            "bServerside":true,
            "sServerMethod":"post",
            "sAjaxSource": "http://localhost/test/test",
            "bDestroy":true,
            "aaSorting":[[2,'desc']]
        }).rowGrouping({
            bExpandableGrouping:true,
            iGroupingColumnInex:6
        });



    $('#data body').bind('click','tr.group',function(){
       var data = $('#data').DataTable().row(this).data()
    });
 })
Run Code Online (Sandbox Code Playgroud)

jquery datatables

4
推荐指数
1
解决办法
7967
查看次数

使用FPDF和FPDI编辑现有PDF多页文件

我是FPDI来编辑我现有的pdf文件,它的工作非常适合单页.你可以看到我正在编辑我的$tplIdx = $pdf->importPage(1);第一页.我有六页的pdf文件,需要在不同的页面中添加2个变量.

有可能吗?怎么样?

<?php
require_once('fpdf.php');
require_once('fpdi.php');

// initiate FPDI
$pdf = new FPDI();
// add a page
$pdf->AddPage();
// set the sourcefile
$pdf->setSourceFile('ex.pdf');

// import page 1
$tplIdx = $pdf->importPage(1);


// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 10, 10, 200);

// now write some text above the imported page
$pdf->SetFont('Arial');
$pdf->SetTextColor(255,0,0);
$pdf->SetXY(50, 50);
$pdf->Write(0, "Ajay Patel");

$pdf->Output('newpdf1.pdf', 'D');
?>
Run Code Online (Sandbox Code Playgroud)

提前致谢 !

php fpdf fpdi

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

datatables ×1

fpdf ×1

fpdi ×1

jquery ×1

php ×1