`
hb_keepmoving
  • 浏览: 226907 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

javascript pop up window which is the same as current page

 
阅读更多
使用window.open 打开一个和当前页一样内容的窗口。

 

var printPreview = window.open('',"_blank","status=0,toolbar=0,location=0,menubar=0,directories=0,scrollbars=1,resizable=1")
	var printDocument = printPreview.document;
	printDocument.open();
	var html = document.documentElement.innerHTML;
	printDocument.write("<html>"+html +"</html>");
	printDocument.close();

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics