这个真做到像百度那样在同一个页面加上脚本可以实现,在多个页面只用CSS和脚本恐怕不好实现,主要是点连接的时候要进行页面的刷新。脚本的话也会回到原来的,要不就要写一些繁琐的判断了,那花这么大力气做一个这样的效果太不合算了,要是用动态的话那就简单了。单个页面我做了一下你看看有没有帮助
程序代码:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>超链接</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<Script language="javascript" type="text/javascript">
<!--
function navtag(tid,tnum)
{
for (var t=0;t<=tnum;t++)
{
if (t==tid){
document.getElementById(t).innerHTML=document.getElementById("uid"+t).innerText;
document.getElementById(t).style.fontWeight.bold;
}
else{
document.getElementById(t).innerHTML="<a id='uid"+t+"' href='c1.htm' class='news' onMouseUp='navtag("+t+",4)'>链接"+t+"</a>";
}
}
}
-->
</Script>
</head>
<body bgcolor="#C0C0C0">
<table cellpadding="0" cellspacing="0" width="457" height="25">
<!-- MSTableType="nolayout" -->
<tr>
<td id="0" height="25" width="110" align="center">
<a id="uid0" href="c1.htm" class="news" onMouseUp="navtag(0,4)">链接0</a></td>
<td id="1" height="25" width="109" align="center">
<a id="uid1" href="c1.htm" class="news" onMouseUp="navtag(1,4)">链接1</a></td>
<td id="2" height="25" width="121" align="center">
<a id="uid2" href="c1.htm" class="news" onMouseUp="navtag(2,4)">链接2</a></td>
<td id="3" height="25" width="117" align="center">
<a id="uid3" href="c1.htm" class="news" onMouseUp="navtag(3,4)">链接3</a></td>
</tr>
</table>
</body>
</html>