js tab标签切换问题
标签切换的效果没有做出谁帮我看下哪里错了<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="...
标签切换的效果没有做出
谁帮我看下哪里错了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-size: 14px; color: #FF3333;}
-->
</style>
</head>
<body>
<table width="352" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88" height="24" background="TX3/bg_1.jpg" id="td0" onmouseover="javascript:showPage(0);javascript:checkbr(0);"><a style="cursor:hand"><div align="center" class="STYLE3">校园时讯</div></a></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td1" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">通知公告</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td2" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">教学新闻</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td3" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">图片新闻</div></td>
</tr>
<tr>
<td colspan="4"><table width="352" border="0" cellspacing="0" cellpadding="0" id="tdId">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<script language="javascript">
tdStr=new Array();
tdStr[0]="<br>我院与澳大利亚PPC专业咨询有限公司洽谈合作事宜<br>"
tdStr[1]="<br>珠海城市职业技术学院今年诚聘启事<br>"
tdStr[2]="<br>校企合作调研组寻求摄影专业合作伙伴<br>"
tdStr[3]="<br>本学年第一学期教师说课通知<br>"
function showPage(id){
tdId.innerHTML=tdStr[id];
}
function checkbr(id){
for(var i=0;i<4;i++){
btObj=eval('td'+i);
if(id==i){
btObj.style.backgroundImage="url(bg_1.jpg)";
}
esle{
btObj.style.backgroundImage="url(bg_2.jpg)"; }
}
}
</script>
</table>
</body>
</html> 展开
谁帮我看下哪里错了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-size: 14px; color: #FF3333;}
-->
</style>
</head>
<body>
<table width="352" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88" height="24" background="TX3/bg_1.jpg" id="td0" onmouseover="javascript:showPage(0);javascript:checkbr(0);"><a style="cursor:hand"><div align="center" class="STYLE3">校园时讯</div></a></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td1" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">通知公告</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td2" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">教学新闻</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td3" onmouseover="javascript:showPage(0);javascript:checkbr(0);" class="STYLE3" style="cursor:hand">图片新闻</div></td>
</tr>
<tr>
<td colspan="4"><table width="352" border="0" cellspacing="0" cellpadding="0" id="tdId">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<script language="javascript">
tdStr=new Array();
tdStr[0]="<br>我院与澳大利亚PPC专业咨询有限公司洽谈合作事宜<br>"
tdStr[1]="<br>珠海城市职业技术学院今年诚聘启事<br>"
tdStr[2]="<br>校企合作调研组寻求摄影专业合作伙伴<br>"
tdStr[3]="<br>本学年第一学期教师说课通知<br>"
function showPage(id){
tdId.innerHTML=tdStr[id];
}
function checkbr(id){
for(var i=0;i<4;i++){
btObj=eval('td'+i);
if(id==i){
btObj.style.backgroundImage="url(bg_1.jpg)";
}
esle{
btObj.style.backgroundImage="url(bg_2.jpg)"; }
}
}
</script>
</table>
</body>
</html> 展开
1个回答
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-size: 14px; color: #FF3333;}
-->
</style>
</head>
<body>
<table width="352" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88" height="24" background="TX3/bg_1.jpg" id="td0" onmouseover="showPage(0);checkbr(0);" class="STYLE3" style="cursor:hand"><a style="cursor:hand"><div align="center" class="STYLE3">校园时讯</div></a></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td1" onmouseover="showPage(1);checkbr(1);" class="STYLE3" style="cursor:hand">通知公告</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td2" onmouseover="showPage(2);checkbr(2);" class="STYLE3" style="cursor:hand">教学新闻</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td3" onmouseover="showPage(3);checkbr(3);" class="STYLE3" style="cursor:hand">图片新闻</div></td>
</tr>
<tr>
<td colspan="4"><table width="352" border="0" cellspacing="0" cellpadding="0" id="tdId">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<script language="javascript">
var tdStr=new Array();
tdStr[0]="<br>我院与澳大利亚PPC专业咨询有限公司洽谈合作事宜<br>";
tdStr[1]="<br>珠海城市职业技术学院今年诚聘启事<br>";
tdStr[2]="<br>校企合作调研组寻求摄影专业合作伙伴<br>";
tdStr[3]="<br>本学年第一学期教师说课通知<br>";
function showPage(id){
document.getElementById("td" + id).innerHTML=tdStr[id];
}
function checkbr(id){
for(var i=0;i<4;i++){
btObj=eval('td'+i);
if(id==i){
btObj.style.backgroundImage="url(bg_1.jpg)";
}
else{
btObj.style.backgroundImage="url(bg_2.jpg)";
}
}
}
</script>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-size: 14px; color: #FF3333;}
-->
</style>
</head>
<body>
<table width="352" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88" height="24" background="TX3/bg_1.jpg" id="td0" onmouseover="showPage(0);checkbr(0);" class="STYLE3" style="cursor:hand"><a style="cursor:hand"><div align="center" class="STYLE3">校园时讯</div></a></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td1" onmouseover="showPage(1);checkbr(1);" class="STYLE3" style="cursor:hand">通知公告</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td2" onmouseover="showPage(2);checkbr(2);" class="STYLE3" style="cursor:hand">教学新闻</div></td>
<td width="88" background="TX3/bg_2.jpg"><div align="center" id="td3" onmouseover="showPage(3);checkbr(3);" class="STYLE3" style="cursor:hand">图片新闻</div></td>
</tr>
<tr>
<td colspan="4"><table width="352" border="0" cellspacing="0" cellpadding="0" id="tdId">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<script language="javascript">
var tdStr=new Array();
tdStr[0]="<br>我院与澳大利亚PPC专业咨询有限公司洽谈合作事宜<br>";
tdStr[1]="<br>珠海城市职业技术学院今年诚聘启事<br>";
tdStr[2]="<br>校企合作调研组寻求摄影专业合作伙伴<br>";
tdStr[3]="<br>本学年第一学期教师说课通知<br>";
function showPage(id){
document.getElementById("td" + id).innerHTML=tdStr[id];
}
function checkbr(id){
for(var i=0;i<4;i++){
btObj=eval('td'+i);
if(id==i){
btObj.style.backgroundImage="url(bg_1.jpg)";
}
else{
btObj.style.backgroundImage="url(bg_2.jpg)";
}
}
}
</script>
</table>
</body>
</html>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询