下面上例子;自己对照改一下:main.htm
===============<html>
<frameset rows="100,*">
<frame name="Wintop" src="11.htm">
<frame src="2.htm">
</frameset>
</html>11.htm
=================
<html>
<body>
测试
</body>
</html>2.htm
============
<html>
<head>
<script>
function test(){
parent.Wintop.focus()
parent.Wintop.print()
}
</script>
</head>
<body>
<input type=button onclick="test()" value="打印">
</body>
</html>
===============<html>
<frameset rows="100,*">
<frame name="Wintop" src="11.htm">
<frame src="2.htm">
</frameset>
</html>11.htm
=================
<html>
<body>
测试
</body>
</html>2.htm
============
<html>
<head>
<script>
function test(){
parent.Wintop.focus()
parent.Wintop.print()
}
</script>
</head>
<body>
<input type=button onclick="test()" value="打印">
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货