【引用】要给所有我们想伪装的链接添加一个class,class有助于jQuery帮我们找到需要伪装的链接而撇开其它不需要伪装的链接.title有两个作用:当鼠标划过链接的时候会有一个小小的盒状提示显示URL:http://www.affsite.com/并且同样的信息会显示在浏览器的状态栏(IE Only).
<p><a href="http://www.affsite.com?id=123" title="http://www.affsite.com"
class="affLink">Super Duper Product</a></p>
正常的链接只是href,有些不想显示则用title
用jquery时写一个class
$('a.affLink').mouseover(function(){window.status=this.title;return true;})
.mouseout(function(){window.status='Done';return true;});
<p><a href="http://www.affsite.com?id=123" title="http://www.affsite.com"
class="affLink">Super Duper Product</a></p>
正常的链接只是href,有些不想显示则用title
用jquery时写一个class
$('a.affLink').mouseover(function(){window.status=this.title;return true;})
.mouseout(function(){window.status='Done';return true;});
本文介绍了一种使用jQuery来实现链接伪装的方法,通过为特定链接添加class,并利用mouseover和mouseout事件来改变浏览器状态栏显示的内容,以此达到链接伪装的效果。

被折叠的 条评论
为什么被折叠?



