我正在尝试打印js变量,但仅显示字符串
success: function(data)
{
var temp = $(".acname").text(data.accName[0].user_full_name);
},
buttons: [
{
extend: 'print',footer: 'true',className: "btn btn-primary",
customize: function ( win ) {
$(win.document.body)
.css( 'font-size', '10pt' )
.prepend(
'<h2 align="center"><font color="#5CAAFF">Barque Trans And Logistics P.V.T.L.T.D</font></h2>'+
'<h3 align="center"><font color="#5CAAFF">Safeguarding Valuables</font></h3>'+
'<hr style="height: 1px;">'+
'<h5 align="center"><strong>REPORT FOR LEDGER </strong></h5>'+
//on this line I am trying to use variable
'<h5 align="center"> <?php echo $temp ?> </h5>'
);
在我的var temp变量中,它给我一个名字,并希望在
上使用该名字。 `'<h5 align="center"> <?php echo $temp ?> </h5>'`