<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<table>
<tr><td><input type="button" id="btn1" value="按钮1">
<input type="button" id="btn2" value="按钮2" onclick="JavaScript:document.getElementById('btn1').removeNode(true);">
</td>
</tr>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<table>
<tr><td><input type="button" id="btn1" value="按钮1">
<input type="button" id="btn2" value="按钮2" onclick="JavaScript:document.getElementById('btn1').removeNode(true);">
</td>
</tr>
</BODY>
</HTML>
test.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>document</title>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0">
<tr>
<td height="40">欢迎你来到这里</td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="100" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" id="dis"> <tr align="center" valign="top" bgcolor="#FFFFFF"> <td>
<a href="test1.htm" target="right">歌曲</a></td>
</tr>
<tr align="center" valign="top" bgcolor="#FFFFFF"><td>
<a href="test.htm" target="right">小品</a></td>
</tr>
</table>
</td>
<td height="500" valign="top" bgcolor="#E9F0F6">
<iframe width=100% height=100% frameborder=0 marginwidth=0 marginheight=0 scrolling=auto src="gq.htm" name="right">
</iframe></td>
</tr>
</table>
</body>
</html>gq.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<table>
<tr><td><input type="button"value="°´Å¥1" onClick="top.document.getElementById('dis').style.display = 'none';">
<input type="button"value="°´Å¥2" onClick="top.document.getElementById('dis').style.display = 'none';">
</td>
</tr>
</BODY>
</HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<table>
<tr ><td><input type="button" name="btn1" value="按钮1">
<input type="button" name="btn2" value="按钮2" onclick=btn1.style.display="none";>
</td>
</tr>
</BODY>
</HTML>
楼主多看看DHTML会有大收获
我现在想做这样一件事情,就是想把右边的东西打印出来但是不想要左边的部分不知道该怎么做
请高手指点
test.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>document</title>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0">
<tr>
<td height="40">欢迎你来到这里</td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="100" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0"> <tr align="center" valign="top" bgcolor="#FFFFFF"> <td>
<a href="test1.htm" target="right">歌曲</a></td>
</tr>
<tr align="center" valign="top" bgcolor="#FFFFFF"><td>
<a href="test.htm" target="right">小品</a></td>
</tr>
</table>
</td>
<td height="500" valign="top" bgcolor="#E9F0F6">
<iframe width=100% height=100% frameborder=0 marginwidth=0 marginheight=0 scrolling=auto src="gq.htm" name="right">
</iframe></td>
</tr>
</table>
</body>
</html>gq.htm
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
<input type=button value=打印设置 onclick=document.all.WebBrowser.ExecWB(7,1)>
</BODY>
</HTML>
<!--
@media print.onlyShow{ display:none}
-->
</style>
不想打印出来的应用class=onlyShow就可以了
不想打印iframe这个方法能实现不打印iframe吗?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>document</title>
<style>
@media print{
.xx {display:none}
}
</style>
</head>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" class=xx>
<tr>
<td height="40">欢迎你来到这里</td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="100" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" class=xx > <tr align="center" valign="top" bgcolor="#FFFFFF"> <td>
<a href="test1.htm" target="right">歌曲</a></td>
</tr>
<tr align="center" valign="top" bgcolor="#FFFFFF"><td>
<a href="test.htm" target="right">小品</a></td>
</tr>
</table>
</td>
<td height="500" valign="top" bgcolor="#E9F0F6">
<iframe width=100% height=100% frameborder=0 marginwidth=0 marginheight=0 scrolling=auto src="gq.htm" name="right">
</iframe></td>
</tr>
</table>
</body>
</html>