I am implementing some print function for iframe now , and i am using below code:
$(\'#printBtn\').click(function(){
var iframe = document.getElementBy
execCommand('print')
is not supported by Firefox.
https://developer.mozilla.org/en-US/docs/Web/API/document.execCommand
You can use the print()
function instead.
window.print() ;
https://developer.mozilla.org/en-US/docs/Web/API/Window.print
You might want to read this: Printing a (part of) webpage with Javascript
Hope this helps.