开发者

window.print issues with iFrame and IE7

I'm using window.print() from ins开发者_如何学Cide an iFrame. This works flawlessly in FF, but not so great in IE7. In IE7, it brings up the Print Dialog, however, the dialog itself is slow, choppy and unstable.

I'm having troubles understanding this problem, and any help would be greatly appreciated.


If I may add, the same thing happens when printing content of the same iFrame from outside of the iFrame in question. Further more, when clicking File->Print the Print Dialog appears to function normally.


Try using:

document.execCommand('print', false, null);

This appears to work in IE7, but you'll probably want to use a conditional and use window.print() for other browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜