去掉链接时虚线框的几个方法

我想很多朋友都遇到这个问题,当点击一个链接的时候,总会出现一个虚线框。
在这介绍几种去除的方法:
1.直接给链接加是onfocus=”this.blur()”.

<a href="#" onfocus="this.blur()">链接</a>

2.CSS实现

a{blr:expression(this.onFocus=this.close());} /* 只支持IE,过多使用效率低 */
 
a{blr:expression(this.onFocus=this.blur());} /* 只支持IE,过多使用效率低 */
 
a:focus { -moz-outline-style: none; } /* IE不支持 */

3..htc实现IE支持

<public:attach event="onfocus" onevent="hscfsy()"/>
<script language="javascript">
function hscfsy(){
this.blur();
}
<
/script>

调用 a {behavior:url(htc文件所在路径地址)}

4.通过JavaScript遍历实现

window.onload=function()
{
for(var ii=0; ii document.links$[$ii$]$.onfocus=function(){this.blur()}
}

5.对WordPress可以用内部的JQuery框架来去除

  1. $("a").bind("focus",function(){
  2. if(this.blur){ 
  3. this.blur();
  4. }
  5. });

GOTOP5 条评论 To 去掉链接时虚线框的几个方法

  1. 可咔酷 说道:

    不知道博主用的哪种方法 能介绍下吗

  2. HillBoy 说道:

    5.对WordPress可以用内部的JQuery框架来去除
    能否详细说明呢?

  3. 吓我一跳 说道:

    写的这么好怎么没人留言呢

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

无觅相关文章插件,快速提升流量