一个菜鸟问题,高手帮帮我

MyLearn 2003-08-21 10:26:39
动态显示table的问题,要求是刷新一个页面,在左边显示多行1列的表格,占屏幕30%左右,右边什么都不显示,鼠标单击左边表格中的一个内容,在右边动态生成一个表格(占屏幕70%,左边表格不动),显示与左边表格相关内容及具体说明。解决了立刻给分,我将一直在线关注此问题。
...全文
27 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
conner 2003-08-21
  • 打赏
  • 举报
回复
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!--
function dis(strid)
{
for (i=1;i<6;i++)
{
if (strid=="0"+i)
{
str="div0"+i
str= str+".style.display=''";
eval(str);
}
else
{
str="div0"+i
str= str+".style.display='none'";
eval(str);
}
}
}
//-->
</SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center" onclick="dis('01');" style="cursor:hand">标题1</div>
</td>
</tr>
<tr>
<td>
<div align="center" onclick="dis('02');" style="cursor:hand">标题2</div>
</td>
</tr>
<tr>
<td>
<div align="center" onclick="dis('03');" style="cursor:hand">标题3</div>
</td>
</tr>
<tr>
<td>
<div align="center" onclick="dis('04');" style="cursor:hand">标题4</div>
</td>
</tr>
<tr>
<td>
<div align="center" onclick="dis('05');" style="cursor:hand">标题5</div>
</td>
</tr>
</table>
</td>
<td width="89%"><div id="div01" style="display:none">标题1的内容</div><div id="div02" style="display:none">标题2的内容</div><div id="div03" style="display:none">标题3的内容</div><div id="div04" style="display:none">标题4的内容</div><div id="div05" style="display:none">标题5的内容</div></td>
</tr>
</table>
</body>
</html>
MyLearn 2003-08-21
  • 打赏
  • 举报
回复
楼上的谢谢了
shiyudir12 2003-08-21
  • 打赏
  • 举报
回复
<script language="javascript">
function Process(){
var TargetTd = document.all("HiddenTd");
var TargetTable = document.all("Table1");
if(TargetTd.style.display=='none'){
TargetTable.width='100%';
TargetTd.style.display='block';
}
else{
TargetTable.width='30%';
TargetTd.style.display='none';
}
}
</script>
<BODY>
<table width="30%" border="1" id="Table1">
<tr>
<td width="30%" onclick="Process()"> </td>
<td width="70%" id="HiddenTd" style="display:none"> </td>
</tr>
</table>
</BODY>
mjwgtm 2003-08-21
  • 打赏
  • 举报
回复
上面的东西是照你说的做的,其实最好还是用框架的好

<IFRAME>...</IFRAME>
用法:      创建一个内联的帧
开始/结束标识: 必须/必须
属性:      name="..."定义帧的名字
         scr="..."定义在帧中显示的内容的来源
         frameborder="..."定义帧之间的边界(0或1)
         margwidth="..."设置帧的边界和其中内容之间的间距
         margheight="..."设置帧的边界和其中内容之间的间距化
         align="..."被反对。控制对齐方式(left, center, right, justify)
         noresize="..."使帧的尺寸不能变
         scrolling="..."设置滚动条的表示方式(auto, yes, no)
         height="..."帧的高度
         width="..."帧的宽度
mjwgtm 2003-08-21
  • 打赏
  • 举报
回复
<html>
<head>
<title>无标题文档</title>
</head>
<body>
<table width="30%" height="144" border="1" align="left">
<tr>
<td><a href="#" onclick="right.style.display='block'">a</a></td>
</tr>
<tr>
<td><a href="#" onclick="right.style.display='block'">b</a></td>
</tr>
<tr>
<td><a href="#" onclick="right.style.display='block'">c</a></td>
</tr>
<tr>
<td><a href="#" onclick="right.style.display='block'">d</a></td>
</tr>
<tr>
<td><a href="#" onclick="right.style.display='block'">e</a></td>
</tr>
<tr>
<td><a href="#" onclick="right.style.display='block'">f</a></td>
</tr>
</table>
<table width="70%" height="148" border="1" id=right style="display:none">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
MyLearn 2003-08-21
  • 打赏
  • 举报
回复
晕,用框架还用你们说,我说的是用table,不用框架
甘泉123 2003-08-21
  • 打赏
  • 举报
回复
<frameset rows="100,*">
<frameset cols="150,*">
<frame src="3.asp" name="user">
<frame src="1.asp" name="message">
</frameset>
<frame src="2.asp" name="say"></frameset>
<noframes></noframes>
甘泉123 2003-08-21
  • 打赏
  • 举报
回复
用层~~
左边的菜单上onmouseover运行一个javascript
lang11zi 2003-08-21
  • 打赏
  • 举报
回复
框架+javascript
chunshui210 2003-08-21
  • 打赏
  • 举报
回复
就是这个 <iframe id='hifm' width=0 height=0 ></iframe>
pp4u 2003-08-21
  • 打赏
  • 举报
回复
<iframe id='hifm' width=0 height=0 ></iframe>
pp4u 2003-08-21
  • 打赏
  • 举报
回复
当然是用iframe
diya 2003-08-21
  • 打赏
  • 举报
回复
用框架,<iframe>

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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