Twitter Bootstrap: Print content of modal window

前端 未结 10 1002
走了就别回头了
走了就别回头了 2020-11-28 02:19

I\'m developing a site using Bootstrap which has 28 modal windows with information on different products. I want to be able to print the information in an open modal window.

10条回答
  •  误落风尘
    2020-11-28 02:49

    you can download printThis lib from this source https://github.com/jasonday/printThis/blob/0a7f799693af8a8303bf0b8df0efc80c2694af81/printThis.js and include it into your html page

    Call the following jquery to print all the content including the content that is not viewable. You may include your css files in an array if you have multiple css files.

    $("#modalDiv").printThis({ 
        debug: false,              
        importCSS: true,             
        importStyle: true,         
        printContainer: true,       
        loadCSS: "../css/style.css", 
        pageTitle: "My Modal",             
        removeInline: false,        
        printDelay: 333,            
        header: null,             
        formValues: true          
    }); 
    

提交回复
热议问题