firefox下按钮点击出现虚线框的去除方法

简单的。加上 onfocus=’this.blur()’ 就OK了。

eg:<button id=”js_shop_cart_port_list” onfocus=’this.blur()’><span>Select Portfolio</span></button>

其他方法,纯CSS的:

<style type="text/css">
.wrap{position:relative;}
.btns{zoom:1;}
.btns *{outline:0;zoom:1;background:#f2f2f2;}
.btns button::-moz-focus-inner{border-color:transparent!important;}
</style>
<div>
<div>
<button type="button">确定</button><button type="button">取消</button>
<a href="#">确定</a><a href="#">取消</a>
</div>
</div>