document.print javascript code example

Example 1: js how to print

console.log(text);

Example 2: how to code print in javascript

console.log("print")
//or
alert("Print")

Example 3: javascript print

console.log("Who's Joe?")

Example 4: javascript print

document.write("Hello world");

Example 5: document.print js

function printImages() {
  printJS({
    printable:    ['https://cdn.shopify.com/s/files/1/0284/4946/products/IMG_8999_720x.jpg?v=1580507812',  'https://bloomex.ca/components/com_virtuemart/shop_image/produc t/Make-a-Wish-LF102-53.png',  'https://s3.amazonaws.com/cdn.brecksbulbs.ca/images/500/60053.jpg'],
    type: 'image',
    header: 'Multiple Images',
    imageStyle: 'width:50%;margin-bottom:20px;'
  })
}