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 - js window.open 然后 print(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9852190/