I would like to add a print button in my webpage. upon clicking the print icon, it should automatically start print the attached image
How can i achieve this?
window.open.img tag.window.print().window.close()You can do this with code like this:
function printImg(url) {
var win = window.open('');
win.document.write('
');
win.focus();
}
http://jsbin.com/qaruze/edit?html,js