Javascript print()适用于除一个URL以外的URL

Javascript print()适用于除一个URL以外的URL,javascript,printing,window,Javascript,Printing,Window,这些链接(iframe src)之间有什么区别?window.print()适用于 var myWindow=window.open('','','fullscreen=yes'); myWindow.document.write("<iframe src=\"http://stackoverflow.com/questions/11447382/window-print-does-not-take-the-current-url\" width=\"100%\" height=\"100

这些链接(iframe src)之间有什么区别?window.print()适用于

var myWindow=window.open('','','fullscreen=yes');
myWindow.document.write("<iframe src=\"http://stackoverflow.com/questions/11447382/window-print-does-not-take-the-current-url\" width=\"100%\" height=\"100%\"></iframe>");
myWindow.document.write('<iframe src="' + url + '" width="100%" height="100%"></iframe>');myWindow.document.close();                            
myWindow.focus();
myWindow.print();
var myWindow=window.open('','fullscreen=yes');
myWindow.document.write(“”);
myWindow.document.write(“”);myWindow.document.close();
myWindow.focus();
myWindow.print();
但不适用于

myWindow.document.write("<iframe src=\"http://localhost:8080/hiringsteps/docs/Keneth _1340800082258/Keneth _resume_1340800082258.pdf\" width=\"100%\" height=\"100%\"></iframe>");
myWindow.document.write(“”);

文件是PDF文件,不是HTML文件。

文件是PDF文件,不是HTML文件