当前位置: 代码迷 >> Java Web开发 >> 怎么打印EXT窗口中的内容
  详细解决方案

怎么打印EXT窗口中的内容

热度:2067   发布时间:2016-04-10 23:27:46.0
如何打印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,
                        height: 500,
                        style: 'border-width: 0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);'
                    }
                }]
            }]
        });
        me.callParent(arguments);
extjs

------解决方案--------------------
用 applet 调用 js 拿到数据,然后打印
  相关解决方案