去掉点击链接时出现的虚线框的几个方法

(编辑:jimmy 日期: 2024/6/2 浏览:2)

在这介绍几种去除的方法:

直接给链接加是
onfocus=”this.blur()”.
<a href="#" onfocus="this.blur()">链接</a>

CSS实现

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

htc实现IE支持

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

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

通过JavaScript遍历实现

复制代码代码如下:
window.onload=function()
{
for(var ii=0; ii document.links$[$ii$]$.onfocus=function(){this.blur()}
}

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

复制代码代码如下:
$("a").bind("focus",function(){
if(this.blur){ //如果支持 this.blur
this.blur();
}
});

一句话新闻

Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。