我有两个问题:
编辑 - 让我解释一下。
答案 0 :(得分:0)
JQuery是一个很好的JavaScript框架。您可以使用大量插件轻松完成(1)。 Jquery Plugins
至于(2),你可能不得不做那个服务器端。不确定您使用的是哪种服务器技术,但是在呈现视图时,您必须使用某种过滤器遍历页面上的所有单词并创建链接。
答案 1 :(得分:0)
1: 我知道在CSS中你可以使用一些hover关键字来影响页面(但我对CSS知之甚少)。 在javascript / HTML中有onMouseOver和onMouseOut,所以。
<img onMouseOver="javascript:" onMouseOut="javascript:">
2: 您可以使用正则表达式来查找文本并替换它。
document.body.innerHTML = document.body.innerHTML.replace(new Regex("skills|other|words", g), "<a>$&</a>"); //Note that this searches inside of the html tags so it is better if you know of specific locations to search for the text instead of anywhere in the html.