去掉点击链接时出现的虚线框的几个方法
网站建设 2023-01-28 20:48www.1681989.com免费网站
在这介绍几种去除的方法
直接给链接加是
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-outle-style: none; } / IE不支持 /
htc实现IE支持
<public:attach event="onfocus" onevent="hscfsy()"/>
<script language="javascript">
function hscfsy(){
this.blur();
}
</script>
调用 a {behavior:url(htc文件所在路径地址)}
通过JavaScript遍历实现
wdow.onload=function()
{
for(var ii=0; ii document.lks$[$ii$]$.onfocus=function(){this.blur()}
}
5.对WordPress可以用内部的JQuery框架来去除
$("a").bd("focus",function(){
if(this.blur){ //如果支持 this.blur
this.blur();
}
});
直接给链接加是
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-outle-style: none; } / IE不支持 /
htc实现IE支持
复制代码
代码如下:<public:attach event="onfocus" onevent="hscfsy()"/>
<script language="javascript">
function hscfsy(){
this.blur();
}
</script>
调用 a {behavior:url(htc文件所在路径地址)}
通过JavaScript遍历实现
复制代码
代码如下:wdow.onload=function()
{
for(var ii=0; ii document.lks$[$ii$]$.onfocus=function(){this.blur()}
}
5.对WordPress可以用内部的JQuery框架来去除
复制代码
代码如下:$("a").bd("focus",function(){
if(this.blur){ //如果支持 this.blur
this.blur();
}
});
上一篇:编制网站首页的基本原则
下一篇:Web设计10个在线开发工具介绍