2015-06-29 96 views
-1

我有一個名爲示例表。該表格包含a href標籤內的數據。刪除鏈接顏色和下劃線pdf

我想將表格轉換爲pdf格式。我的代碼是:

var toPDF = function(htmlId, config){ 
    if($('#'+htmlId).length > 0) 
     { 
      reportParameters['reportString'] = $('#'+htmlId).html(); 
      reportParameters['config'] = JSON.stringify(config); 
      window.open('url','Page'); 
     } 
    else 
     { 
      alert('Invalid HTML ID'); 
     } 
    }; 


function myFunc() 
{ 
    var conf = { 
     'headerCenter':'sample', 
     'pageSize':'A4', 
     'headerFontSize':18, 
     'headerLine':true, 
     'headerSpacing':2, 
     'footerLine':false, 
     'footerCenter':'Date: [date] [time]', 
     'footerRight':'Page[page]', 
     'footerFontSize':8, 
     'footerSpacing':1 
    }  
    toPDF('sample',conf); 
} 

上面的代碼工作正常。但我的問題是,PDF數據包含鏈接數據爲藍色並加下劃線。

如何刪除鏈接顏色和下劃線?

+0

'a {text-decoration:none; color:#000;}' – madalinivascu

+0

什麼是'toPdf'?也許那裏有文檔 – mplungjan

+0

使用madlin – Sato

回答

0

檢查這兩個CSS代碼!

a {color:black;text-decoration:none;} 
a:hover{text-decoration:none;color:red;} 
相關問題