【发布时间】:2012-04-08 18:42:57
【问题描述】:
print() 在打开新窗口后在 IE 中不起作用。它适用于 Chrome。 这是tester:
<html>
<head>
<script type="text/javascript">
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>This is 'myWindow'</p>");
myWindow.focus();
myWindow.print(); //DOES NOT WORK
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()" />
</body>
</html>
【问题讨论】:
标签: javascript html printing window