<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script>
var lastBtn = null
function colorBtn(which){
if( lastBtn != null ){
lastBtn.style.background = "none"
lastBtn.style.color = "black"
}
which.style.background = "blue"
which.style.color = "white"
lastBtn = which
}
</script>
<body>
<table width="120" border="1" cellspacing="0" cellpadding="2">
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
</table></body>
</html>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script>
var lastBtn = null
function colorBtn(which){
if( lastBtn != null ){
lastBtn.style.background = "none"
lastBtn.style.color = "black"
}
which.style.background = "blue"
which.style.color = "white"
lastBtn = which
}
</script>
<body>
<table width="120" border="1" cellspacing="0" cellpadding="2">
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
<tr>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">12312</td>
<td onclick="colorBtn(this)">123</td>
</tr>
</table></body>
</html>
解决方案 »
- 求助google地图的怎么在marker旁边加一个信息框显示信息
- 怎样读取Cookie?
- input file问题
- JS错误: Unterminated string constant(字符集问题,至今0回答)
- 求一个字体设置的解决方案,谢谢了
- 【我的世界难题】js写条cookie,其中有两个属性,结果两种方法只有一种遂愿,求解???
- 有没有好的浏览器表格控件?用javascript或者htc实现的。
- 修改注册表实现象"卓越"在ie工具栏的快截方式!
- 如何实现选中单选按钮后显示出其它表单元素?
- 如何实现“无边窗口”总在最前面?
- html中的img对象或vml中的img对象能否旋转任意角度?
- 怎么保存txt文件?
<td height="26" align="left" onclick="colorBtn(this)"><a href="logon.jsp" class="global_nav">网上交易</a></td></tr>
(我想在页面上点击按钮后,把class="global_nav"变成class="global_nav2")
这样怎么弄啊
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<Style>
.global_nav{
color:red;
}
.global_nav2{
color:yellow;
}
</Style>
<script>
var lastBtn = null
function colorBtn(which){
if( lastBtn != null ){
lastBtn.style.background = "none"
lastBtn.style.color = "black"
lastLinks = lastBtn.all.tags("a")
lastLinks[0].className = "global_nav"
}
which.style.background = "blue"
which.style.color = "white"
links = which.all.tags("a")
links[0].className = "global_nav2"
lastBtn = which
}</script>
<body>
<table width="703" border="1" cellspacing="0" cellpadding="2">
<tr>
<td height="26" align="left" onclick="colorBtn(this)"><a href="logon.jsp" class="global_nav">网上交易</a>
</td>
</tr>
<tr>
<td height="26" align="left" onclick="colorBtn(this)"><a href="logon.jsp" class="global_nav">网上交易</a>
</td>
</tr></table>
</body>
</html>
<script>
var lastBtn = null
function colorBtn(which){
if( lastBtn != null )
{
lastLinks = lastBtn.all.tags("a")
lastLinks[0].className = "global_nav"
}
links = which.all.tags("a")
links[0].className = "global_nav2"
lastBtn = which
}
<!--
function MM_openBrWindow(url, title)
{ //v2.0
window.open(url,title,"width=605,height=500,resizable=yes,scrollbars=yes,left="+(screen.width/2-300).toString()+",top="+(screen.height/2-250).toString()+"");
}
-->
</script>
<Style>
.global_nav
{
font-size : 9pt;
color: #868686;
padding: 8px 0px 8px 15px;
}
.global_nav2
{
font-size: 9pt;
color:#ff6600;
padding: 8px 0px 8px 15px;
}
</Style>
<table width="775" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- left begin cedef7-->
<td width="180" valign="top" bgcolor="#cedef7" height="400"><br>
<table width="163" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" rowspan="2" valign="top">
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<table width="158" border=0 cellpadding=0 cellspacing=0>
<tr>
<td valign="top" bgcolor="#FFFFFF"><img src="images/3_til_1.gif" width="158" height="27"></td>
</tr>
<!-- first row left content begin -->
<tr>
<td align=center valign="middle" bgcolor="#FFFFFF">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr class="normal">
<td width="150"> »¶Ó­Äú£¡</td>
</tr>
<tr class="normal">
<td>ÇëÑ¡ÔñÏàÓ¦½»Ò×¹¦ÄÜ£¡</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center valign="middle" bgcolor="#6373CE"><img src="images/spacer.gif" width="1" height="16"></td>
</tr>
<!-- first row left content end -->
<!-- left menu begin-->
<tr>
<td align=center valign="middle" bgcolor="#FFFFFF" class="normal">
<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="8"></td>
</tr>
<tr>
<td height="26" align="left" onclick="colorBtn(this)"><a href="open.jsp" class="global_nav">ÍøÉÏ¿ª»§</a></td>
</tr>
<tr>
<td background="images/dashline_h_01.gif"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="26" align="left" onclick="colorBtn(this)"><a href="logon.jsp" class="global_nav">ÍøÉϽ»Ò×</a></td>
</tr>
<tr>
<td background="images/dashline_h_01.gif"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<!-- left menu begin-->
</table>
</td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#FFFFFF" style="padding-top:3px;">
<a href="fundGuide.htm" target="blank"><img src="images/guide.gif"/></a>
</td>
</tr>
</table>
</td>
<td width="3" height="3" valign="top" bgcolor="#E3E3E3"><img src="images/spacer_green.gif" width="3" height="3"></td>
</tr>
<tr>
<td bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
</tr>
<tr>
<td width="3" bgcolor="#E2EEC4"><img src="images/spacer.gif" width="3" height="3"></td>
<td width="160" bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
<td width="3" bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
</tr>
</table>
<br>
</td>
<!-- left end --> <!-- right begin -->
<td width="595" valign="top" style="background-image: URL(bg.gif);">
<br>
<table width="595" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="center"><table width="523" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" rowspan="2" valign="top"><table width="520" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td valign="top" bgcolor="#FFFFFF"><img src="images/personal_main_head.gif" width="518" height="68"></td>
</tr>
</table></td>
<td width="3" height="3" valign="top" bgcolor="#E3E3E3"><img src="images/spacer_white.gif" width="3" height="3"></td>
</tr>
<tr>
<td bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
</tr>
<tr>
<td width="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="3" height="3"></td>
<td width="517" align="left" bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
<td width="3" bgcolor="#E3E3E3"><img src="images/spacer.gif" width="3" height="3"></td>
</tr>
</table>
<br>
不行啊,怎么不能改变颜色的,到底是为什么呀
qq:48114558
联系一下,请教一下
谢谢,能留下你的联系方式么?