`
hb_keepmoving
  • 浏览: 231767 次
  • 性别: 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();

 

 

 

分享到:
评论

相关推荐

    JavaScript BOM操作 window对象的子级对象 示例代码

    JavaScript BOM操作 window对象的子级对象 示例代码JavaScript BOM操作 window对象的子级对象 示例代码JavaScript BOM操作 window对象的子级对象 示例代码JavaScript BOM操作 window对象的子级对象 示例代码...

    Open link in same tab, pop-up as tab-crx插件

    **Open link in same tab, pop-up as tab-crx插件详解** 在当今互联网环境中,浏览器扩展程序已经成为提高浏览效率和个性化体验的重要工具。"Open link in same tab, pop-up as tab-crx" 是一个专为Google Chrome...

    JavaScript权威指南(第6版).JavaScript:The.Definitive.Guide

    It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers who want to master it. 目录: Chapter 1 Introduction to ...

    google不支持window.showModalDialog问题解决方案

    This is a `window.showModalDialog()` shim using a modal HTML5 `&lt;dialog&gt;` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...

    Javascript.Object.Oriented.Programming.pdf

    This course is a comprehensive guide where each chapter consists of best practices, constructive advice, and few easy-to-follow examples that will build up your skills as you advance through the book....

    Beginning JavaScript, 4th Edition

    Includes improved examples on the most up-to-date JavaScript programming techniquesContinuing in the superlative tradition of the first three editions, Beginning JavaScript, Fourth Edition, gets you ...

    Mastering.JavaScript.1785281348

    By the end of the book, you will understand how reactive JavaScript is going to be the new paradigm. What you will learn - Get a run through of the basic JavaScript language constructs - Get familiar...

    [Head.First.JavaScript].Michael.Morrison...

    Weekend at Bernie’s propping up a lifeless web page. Real live interactivity requires a bit more smarts and a little more work... but it has a much bigger payoff. the interactive web (Online) people ...

    Single Page Web Applications JavaScript end-to-end

    And you’ll learn how to capitalize on trends like server-side JavaScript and NoSQL data stores, as well as new frameworks that make JavaScript more manageable and testable as a first-class language....

    Javascript Manual Of Style

    &lt;br/&gt;The second section consists of six chapters, all of which contain a complete JavaScript Web page. Each chapter introduces a problem, demonstrates how you might solve it without JavaScript, ...

    The Definitive Guide to AdonisJs_Building Node.js App with JavaScript-2018

    Beyond adding a CSS framework, everything is as the good browser vendors intended. That said, I welcome you to add your own style to the application We’ll create a secure registration and login ...

    JavaScript权威指南(第6版)

    It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers who want to master it. 目录: Chapter 1 ...

    Modern JavaScript Applications

    When you’ve gained a solid grip on the different architectures, we’ll move on to the area where JavaScript shines, that is, UI development. You’ll learn to build responsive, declarative UIs with ...

    Mastering JavaScript(PACKT,2016)

    By the end of the book, you will understand how reactive JavaScript is going to be the new paradigm. What you will learn Get a run through of the basic JavaScript language constructs Get familiar ...

Global site tag (gtag.js) - Google Analytics