asp的特定打印代码
页面中用的IFRAME 框架,我想打印出IFRAME2中就是dw_2中的内容,请高手帮忙
代码如下:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<BODY id=first class=BODY_MAIN>
<table id=tb class=TableInput border=1 cellPadding=1 cellSpacing=0 style="position: absolute" >
<tr height=* width=100%>
<td id=td width="100%" height=100% marginWidth=0 marginHeight=0>
<table id=tb1 class=TableInput border=1 cellPadding=1 cellSpacing=0 style="top=40;left=0;width:300;height:500;position: absolute" >
<tr height=18>
<td id=title1 width="100%" height="20" marginWidth=0 marginHeight=0 bgcolor="3366CC" style="color:FFFFFF" ><font color=FFFFFF>选择单位人员列表</font></td>
</tr>
<tr>
<td>
<IFRAME
name='dw_1'
id=dw_1
src=""
width="100%"
height="100%"
frameborder="0"
marginHeight=0
marginWidth=0>
</IFRAME>
</td>
</tr>
</table>
<table id=tb3 class=TableInput border=1 cellPadding=1 cellSpacing=0 style="top=0;left=310;width:700;height:500;position: absolute" >
<tr height=18>
<td id=title1 width="100%" height="20" marginWidth=0 marginHeight=0 bgcolor="3366CC" style="color:FFFFFF" ><font color=FFFFFF>只打印着个</font></td>
</tr>
<tr>
<td>
<IFRAME
name='dw_2'
id=dw_2
src=""
width="100%"
height="100%"
frameborder="0"
marginHeight=0
marginWidth=0>
</IFRAME>
</td>
</tr>
</table>
<tr height=20 width=300 id=b>
<td width="100%" height="70%">
<table width=100% border=0 cellPadding=0 cellSpacing=0 style="height=20" >
<tr>
<td valign=middle align=right>
<input type="button" value="增加" onclick="f_add('a')" id=cb_add name=cb_add class=Button>
<input type="button" value="修改" onclick="f_add('e')" id=cb_edit name=cb_edit class=Button>
<input type="button" value="删除" onclick="f_delete()" id=cb_delete name=cb_delete class=Button>
<input type="button" value="查询" onclick="f_search()" id=cb_search name=cb_search class=Button>
<input type="button" value="打印" onclick="dw_2.print()" id=cb_print name=cb_print class=Button>
</td>
</tr>
</table>
</td>
</tr>
</td>
</tr>
</table>
</BODY>
</HTML>