谷歌瀏覽器的打印功能

var OpenWindow = window.open("");  
		    OpenWindow.document.write("<HTML>"); 
		    OpenWindow.document.write("<HEAD>"); 
		    OpenWindow.document.write("<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/>"); 
		    OpenWindow.document.write("<TITLE><\/TITLE>"); 
		    OpenWindow.document.write("<\/HEAD>"); 
		    OpenWindow.document.write(html); 
		    OpenWindow.document.write(); 
		    OpenWindow.document.write("<\/BODY>"); 
		    OpenWindow.document.write("<\/HTML>"); 
		    OpenWindow.print();

html 拼本身的頁面代碼就好了javascript

相關文章
相關標籤/搜索