개발노트

printThis 옵션 본문

Programming/JavaScript

printThis 옵션

dev? 2020. 4. 27. 18:48
반응형

기본 사용

$('selector').printThis();

 

옵션

$("selector").printThis({
    debug: false,               // show the iframe for debugging
    importCSS: true,            // import page CSS
    importStyle: false,         // import style tags
    printContainer: true,       // grab outer container as well as the contents of the selector
    loadCSS: "path/to/my.css",  // path to additional css file - use an array [] for multiple
    pageTitle: "",              // add title to print page
    removeInline: false,        // remove all inline styles from print elements
    printDelay: 333,            // variable print delay; depending on complexity a higher value may be necessary
    header: null,               // prefix to html
    footer: null,               // postfix to html
    base: false ,               // preserve the BASE tag, or accept a string for the URL
    formValues: true,           // preserve input/form values
    canvas: false,              // copy canvas elements (experimental)
    doctypeString: "...",       // enter a different doctype for older markup
    removeScripts: false,       // remove script tags from print content
    copyTagClasses: false       // copy classes from the html & body tag
});

 

 

 

출처:

https://github.com/jasonday/printThis

반응형

'Programming > JavaScript' 카테고리의 다른 글

배열 함수  (0) 2020.04.28
문자열 함수  (0) 2020.04.27
타이머 함수  (0) 2020.04.27
(Math.random()*10)+1  (0) 2020.04.27
크로스사이트 스크립트  (0) 2020.04.27