$('#reportFrame')[0].contentWindow.printMyself();//主页面调用iframe里的打印方法
//reportFrame里的方法
function printMyself() { if (!window.showModalDialog) { //非IE window.print(); } else { //IE下打印 document.body.className += ' ext-ie'; document.execCommand('print', false, null); } }