FrameSet内容
<frameset cols="20%,*">
<frame name="RightWin" src="RightWin.htm">
<frame name="WorkWin" src="Workwin.htm">
</frameset>
RightWin.htm内容
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script language="javascript" type="text/javascript">
function Print() {
alert(window.parent.frames("WorkWin").name);
//window.parent.frames("WorkWin").print();
parent.WorkWin.focus()
parent.WorkWin.print()
}
</script>
</head>
<body>
rightwin
<input id="getPrint" type="button" value="Print" onclick="Print();" />
</body>
</html>
打印frame窗口要 先进行 frameName.focus();
另外注意路径问题。而且打印机设置要"只打印当前框架"
parent.print();