我想打开一个包含css的弹出窗口,我希望它可以打印,但Firefox表现得很奇怪。我不确定它是我的错还是它的错误。 Chrome中没有问题。
<html>
<head>
<script>
popup = function(){
var html = "";
html += "<html>";
html += "<head>";
html += '<link rel="stylesheet" href="popup_print.css">';
html += "</head>";
html += "<body>";
html += '<a onclick="print()">abc</a>';
html += "</body>";
html += "</html>";
var printPopup = window.open("", "PrintWindow", "width=400, height=600, scrollbars=1");
printPopup.document.write(html);
}
</script>
</head>
<body>
<a onclick="popup()">abc</a>
</body>
</html>
当没有css链接时我没有问题......