免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1658 | 回复: 4
打印 上一主题 下一主题

请教超链接的问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-27 22:22 |只看该作者 |倒序浏览
jsp中怎么实现超链接的变色,即为了区分哪个超链接被点击,我想实现点击前是一种颜色,点击后变为另一种颜色。当点击别的超链接时它的颜色又恢复为点击前的颜色。谢谢!

论坛徽章:
0
2 [报告]
发表于 2005-11-27 22:32 |只看该作者
这个根jsp没什么关系吧,可以用javascript+css来实现你要的功能。

论坛徽章:
0
3 [报告]
发表于 2005-11-28 02:34 |只看该作者
同上...就是用这种方法.

论坛徽章:
0
4 [报告]
发表于 2005-11-28 11:16 |只看该作者
实现起来比较简单,

A:visited
{
    BACKGROUND-COLOR: black
}
A A:active
{
}

或者在body标签里面设置vlink 和alink

The BODY element
<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
<!ATTLIST BODY
  %attrs;                              -- %coreattrs, %i18n, %events --
  onload          %Script;   #IMPLIED  -- the document has been loaded --
  onunload        %Script;   #IMPLIED  -- the document has been removed --
  >


Start tag: optional, End tag: optional

Attribute definitions

background = uri [CT]
Deprecated. The value of this attribute is a URI that designates an image resource. The image generally tiles the background (for visual browsers).
text = color [CI]
Deprecated. This attribute sets the foreground color for text (for visual browsers).
link = color [CI]
Deprecated. This attribute sets the color of text marking unvisited hypertext links (for visual browsers).
vlink = color [CI]
Deprecated. This attribute sets the color of text marking visited hypertext links (for visual browsers).
alink = color [CI]
Deprecated. This attribute sets the color of text marking hypertext links when selected by the user (for visual browsers).

论坛徽章:
0
5 [报告]
发表于 2005-11-29 19:01 |只看该作者

谢谢

谢谢,我会了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP