JavaScript的:
function demoJsPdf() {
var doc = new jsPDF("landscape", "mm", "a4");
doc.setFontSize(22);
doc.text(20, 20, 'This is a exmaple of jsPDF');
doc.setFontSize(16);
doc.text(20, 30, 'This example is created by dsharma4u29.');
doc.fromHTML('Print', 20, 60, {'width': 10, 'elementHandlers': specialElementHandlers});
var iframe = document.getElementById('output');
iframe.style.width = '100%';
iframe.style.height = '400px';
iframe.src = doc.output('datauristring');
}
var specialElementHandlers = function() {
return;
}
HTML:
现在,文本“运行代码2”必须显示为超链接,但它只是显示为简单文本,而不是超链接.如何将其作为PDF上的超链接实现?