我有用于打印div内容的此javascript代码。将css写入javascript代码does not work
function PrintElem()
{
var mywindow = window.open('', 'PRINT', 'height=600,width=800');
mywindow.document.write('' + document.title + '');
mywindow.document.write('');
mywindow.document.write('');
mywindow.document.write(''
+ document.title + '');
mywindow.document.write(document.getElementById("favorite_items").innerHTML);
mywindow.document.write('');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10*/
mywindow.print();
mywindow.close();
return true;
}
我该怎么写一些打印CSS的新窗口,JavaScript打开?
这家伙很懒,还没有设置简介