Print only by clicking the button on the page

0

Is there a way to put page content to print just by the child button on the page?

I have the function in JS

function cont(){
    window.print();
}

HTML

<button onClick="cont();">click</button>

Is there a way to go print already when I click the button? without having to open that chrome browser dialog showing things to print.

If possible in js.

    
asked by anonymous 04.07.2018 / 16:03

0 answers