100分请问小问题,高手进啊

wuxinlangman 2005-03-15 06:11:43
怎么样才能实现点右边的按钮让左边消失但是右边的按钮不能消失

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">
<a href="test1.htm" target="right">歌曲</a></td>
</tr>
<tr align="center" valign="top" bgcolor="#FFFFFF">
<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">
<input type="button"value="按钮2">
</td>
</tr>
</BODY>
</HTML>
...全文
191 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
bergkamps 2005-03-17
  • 打赏
  • 举报
回复
<html>
<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>
wuxinlangman 2005-03-17
  • 打赏
  • 举报
回复
怎么没有人了吗?
wuxinlangman 2005-03-16
  • 打赏
  • 举报
回复
哪如果是在iframe里面呢
不想打印iframe这个方法能实现不打印iframe吗?
zhuqm 2005-03-16
  • 打赏
  • 举报
回复
<style type="text/css">
<!--
@media print.onlyShow{ display:none}
-->
</style>
不想打印出来的应用class=onlyShow就可以了
wuxinlangman 2005-03-16
  • 打赏
  • 举报
回复
再线等,请各位打个帮忙!!小弟这里先谢谢了
wuxinlangman 2005-03-16
  • 打赏
  • 举报
回复
谢谢楼上的帮忙,可是功能实现了但是等我用的时候还是不可已的,
我现在想做这样一件事情,就是想把右边的东西打印出来但是不想要左边的部分不知道该怎么做
请高手指点
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>
sfply 2005-03-15
  • 打赏
  • 举报
回复
用style.display='none'很简单控制
楼主多看看DHTML会有大收获
myvicy 2005-03-15
  • 打赏
  • 举报
回复
<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>
redtank2005 2005-03-15
  • 打赏
  • 举报
回复
是不是要这样的?
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>

是是非非 2005-03-15
  • 打赏
  • 举报
回复
<!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>
goodgoodnet 2005-03-15
  • 打赏
  • 举报
回复
关注!
请动不动就给一百分,这样子我会感到惭愧的,帮不上忙的

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧