2013-06-06 2 views
0

jqpring을 사용하여 선택한 웹 페이지 Div를 인쇄하고 싶습니다.선택된 div 인쇄 jqprint를 사용하여

<div id="divToPrint1"> 
Content/section to be printed. 
</div> 

<div id="divDontPrint1"> 
Content/section which will not be printed. 
</div> 

<div id="divToPrint2"> 
Content/section to be printed. 
</div> 

<div id="divDontPrint2"> 
Content/section which will not be printed. 
</div> 

목적 : 여기에 모든 div를 밖으로, 내가 하나 개의 문서에 divToPrint1 & divToPrint2을 인쇄 할.

도움이 되었으면 좋겠습니다.

감사합니다.

$('#my_div').html($('#divToPrint1').html()); 
$('#my_div').append($('#divToPrint2').html()); 

그런 다음 작업

$('#my_div').print(); 

답변

1

는 시도 .. ??
+0

@Joe처럼 my_div 인쇄처럼 – Gautam3164

+0

곧 확인해 보겠습니다. 감사합니다. – Joe

+0

아니,이 작동하지 않습니다 !! 다른 해결책? – Joe

관련 문제