图片地址你换下
<body>
<STYLE type=text/css>
.sec1 {
BORDER-RIGHT: gray 0px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 0px solid; COLOR: #ffffff; BORDER-BOTTOM: #ffffff 0px solid; BACKGROUND-COLOR: #ffffff
}
.sec2 {
BORDER-RIGHT: gray 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-WEIGHT: bold; BORDER-LEFT: #ffffff 0px solid;COLOR: #ffffff; BACKGROUND-COLOR: #ffffff
}
.main_tab {
BORDER-RIGHT: gray 0px solid; BORDER-LEFT: #ffffff 0px solid; COLOR: #ffffff; BORDER-BOTTOM: gray 0px solid; BACKGROUND-COLOR: #ffffff
}
</STYLE>
<!--JavaScript部分-->
<SCRIPT language=javascript>
function secBoard(n)
{ var secRow=document.getElementById("secTable").rows[0];
for(i=0;i<secRow.cells.length;i++)
secRow.cells[i].className="sec1";
secRow.cells[n].className="sec2";
var objdiv=document.getElementById((n==0)?"div1":"div2")
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="none";
objdiv.style.display="block";
}
</SCRIPT>
<table width="400" height="" border="0" align="center"
cellpadding="0" cellspacing="0" class="main_tab" id="mainTable">
<!--关于TBODY标记-->
<tr >
<td >
<div id="div1" width="400" height="69" align="middle" style="DISPLAY: block">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td height="29"><img src="http://community.csdn.net/logo/images/prj.210.67.gif" width="400" height="400" /></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr> <tr>
<td>
<div id="div2" width="400" height="69" align="middle" style="DISPLAY: none">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td height="400"><img src="http://zi.csdn.net/ut300_60.gif" width="400" height="400" /></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
<br />
<table width="411" border="0" align="center" cellpadding="10" cellspacing="0" id="secTable">
<tbody>
<tr align="middle" height="20">
<td width="137" height="85" class="sec2" onclick="secBoard(0)"><div align="center"><img src="http://zi.csdn.net/ut300_60.gif" width="137" height="85" /></div></td>
<td width="137" height="85" class="sec1" onclick="secBoard(1)"><div align="center"><img src="http://zi.csdn.net/ut300_60.gif" width="137" height="85" /></div></td>
</tr>
</tbody>
</table>
</body>
<body>
<STYLE type=text/css>
.sec1 {
BORDER-RIGHT: gray 0px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 0px solid; COLOR: #ffffff; BORDER-BOTTOM: #ffffff 0px solid; BACKGROUND-COLOR: #ffffff
}
.sec2 {
BORDER-RIGHT: gray 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-WEIGHT: bold; BORDER-LEFT: #ffffff 0px solid;COLOR: #ffffff; BACKGROUND-COLOR: #ffffff
}
.main_tab {
BORDER-RIGHT: gray 0px solid; BORDER-LEFT: #ffffff 0px solid; COLOR: #ffffff; BORDER-BOTTOM: gray 0px solid; BACKGROUND-COLOR: #ffffff
}
</STYLE>
<!--JavaScript部分-->
<SCRIPT language=javascript>
function secBoard(n)
{ var secRow=document.getElementById("secTable").rows[0];
for(i=0;i<secRow.cells.length;i++)
secRow.cells[i].className="sec1";
secRow.cells[n].className="sec2";
var objdiv=document.getElementById((n==0)?"div1":"div2")
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="none";
objdiv.style.display="block";
}
</SCRIPT>
<table width="400" height="" border="0" align="center"
cellpadding="0" cellspacing="0" class="main_tab" id="mainTable">
<!--关于TBODY标记-->
<tr >
<td >
<div id="div1" width="400" height="69" align="middle" style="DISPLAY: block">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td height="29"><img src="http://community.csdn.net/logo/images/prj.210.67.gif" width="400" height="400" /></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr> <tr>
<td>
<div id="div2" width="400" height="69" align="middle" style="DISPLAY: none">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td height="400"><img src="http://zi.csdn.net/ut300_60.gif" width="400" height="400" /></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
<br />
<table width="411" border="0" align="center" cellpadding="10" cellspacing="0" id="secTable">
<tbody>
<tr align="middle" height="20">
<td width="137" height="85" class="sec2" onclick="secBoard(0)"><div align="center"><img src="http://zi.csdn.net/ut300_60.gif" width="137" height="85" /></div></td>
<td width="137" height="85" class="sec1" onclick="secBoard(1)"><div align="center"><img src="http://zi.csdn.net/ut300_60.gif" width="137" height="85" /></div></td>
</tr>
</tbody>
</table>
</body>
解决方案 »
- 辨别:是数组,还是其他对象
- 右下角弹框,将其它程序最小化
- jquery 里面的"jQuery"变量 是怎么链接的? 谁能举个简单的例子说明???
- 解释下document.write("<option value=\"",arr[i],"\" ",SELECTED,">",arr[i]); 的语
- Textarea自动适用高度且无滚动条解决方案
- 请各位帮我看一下这个JS有什么问题?
- 菜鸟求教~获取文本内容再查询数据库的代码是怎么写?
- 关于用div实现frame固定框架的问题
- 如何阻止checkbox点击事件响应两次?
- 正则表达式:匹配特殊符号,请教如何写?
- 请教关于虚拟房间实现的问题
- frame.setAttribute( "scroll", "yes" ) 和 frame.style.overflow = "scroll"; 都没用,能动态设置iframe的滚动条吗?
secTable.rows[i].cells[j].setAttribute("class","sec1");