default file name print javascript not working code example Example: window.print filename document.title = 'My new title'; window.print();