87,997
社区成员




a:hover {color: red; text-decoration:underline; font-size:18px;}
a:visited {color:purple;text-decoration:none; font-size:18px;}
<A href="test1.htm" target="_blank">WebSiteA</A>
<A href="test2.htm" target="_blank">WebSiteB</A>
var links = document.getElementsByTagName('a'), selectedLink = null;
for (var i = 0, length = links.length; i < length; i++) {
links[i].onmouseover = function() {
this.style.fontWeight = 'bold';
}
links[i].onmouseout = function() {
if(this != selectedLink) this.style.fontWeight = '';
}
links[i].onclick = function() {
if (selectedLink) selectedLink.style.fontWeight = '';
selectedLink = this;
}
}
<table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<Td height="18">
<FONT color=#ff3300><B> -</B></FONT><A href="test1.htm">WebSiteA</A>
</tr>
<tr>
<Td height="18">
<FONT color=#ff3300><B> -</B></FONT><A href="test2.htm">WebSiteB</A></tr>
</table>
您点击的是websiteA,我想用js来实现效果如http://www.4world.pl/categories/kategoria/29这个网站的产品列表,当鼠标放上去,文字链接变大,点击后,文字链接还是变大,当点击其他的文字连接后,原来点击过的文字链接恢复原形,新点击的文字链接就变粗了。谢谢
<LINK href="t/Style.css" type=text/css rel=stylesheet>
<table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<Td height="18">
<FONT color=#ff3300><B> -</B></FONT><A href="test1.htm">WebSiteA</A>
</tr>
<tr>
<Td height="18">
<FONT color=#ff3300><B> -</B></FONT><A href="test2.htm">WebSiteB</A></tr>
</table>
您点击的是websiteB,我想用js来实现效果如http://www.4world.pl/categories/kategoria/29这个网站的产品列表,当鼠标放上去,文字链接变大,点击后,文字链接还是变大,当点击其他的文字连接后,原来点击过的文字链接恢复原形,新点击的文字链接就变粗了。谢谢