日期:2014-05-17  浏览次数:20639 次

如何打印EXT窗口中的内容
如何打印EXT窗口中的内容

'-', {
                xtype: 'button',
                icon: 'static/images/btnimg/tongji.png',
                height: 20,
                width: 60,
                action: 'print',
                text: '打印',
                handler: function(){
                 var win = Ext.getCmp("logoPic4");
                    var c = win.body.first().dom.innerHTML;
                    var printer = win.body.last().dom.contentWindow;
                    printer.document.body.innerHTML = c;
                    printer.print();
                  }
            },
            '-', 


要打印的内容:

Ext.applyIf(me, {
            items: [{
                xtype: 'panel',
                region: 'center',
                layout: 'fit',
                tbar: wrmpbtbar,
                items: [{
                    xtype: 'box',
                    id: 'logoPic4',
                    width: 900,
                    height: 500,
                    autoEl: {
                        tag: 'img',
                        width: 900,