使用print()可以直接调用浏览器的打印功能。 对于只想打印iframe中的内容,FF下面可以使用frams[0].print();但是ie下打印的还是包含父框架。IE需要将焦点指定到子框架,再调用print()才行。 <html> <head> <mce:script type="text/javascript"><!-- function pr(){ frames[0].focus(); frames[0].print(); } // --></mce:script> </head> <body> <input type="button" οnclick="pr()" value="打印" /> <h1> test<p/> test<p/> test<p/> </h1> <iframe name="frame" src="frame.html" mce_src="frame.html" ></iframe> </body> </html>