var view_print = function() {
          var popupWindow = window.open( "", "print", "toolbar=no" );

                popupWindow.document.write( "<head>");
                popupWindow.document.write( $('head').html() );
                popupWindow.document.write( '</head>' );

 

                var $table = $("#div_popContents");
                
                popupWindow.document.write( '<body>' );
                popupWindow.document.write( '<div>' );
                popupWindow.document.write( $table.html() );
                popupWindow.document.write( '</div>' );
                popupWindow.document.write( '</body>' );
               
                popupWindow.window.close();
               
                popupWindow.print();
            };

'JavaScript' 카테고리의 다른 글

[JavaScript] 팝업 가운데 띄우기  (0) 2015.02.16
[JavaScript] jSon Array 사용.  (0) 2015.02.12
[JavaScript] jQgrid 참고  (0) 2015.01.12
[JavaScript] jQgrid 예제  (0) 2015.01.12
[JavaScript] 복사, 붙여넣기 방지  (0) 2014.11.07

+ Recent posts