반응형 프린트1 [JavaScript] 인쇄할 내용을 객체로 만들어서 프린트하기 $(document).ready(function(){ $("#print_btn").on("click", function(){ const completeParam = makeHtml(app_idx); //app_idx : DB에서 불러온 인덱스(상황에 따라 변경) reportPrint(completeParam); }); }); //인쇄할 내용을 객체화시킴 function makeHtml(app_idx){ const obj = {html : ''}; let html = ''; html += '' + "No." + app_idx + ''; html += '인쇄할 내용'; html += ''; obj.html = html; return obj; } //실제 인쇄창 팝업 function reportPrint(pa.. 2020. 1. 30. 이전 1 다음 반응형