欢迎光临
安安一直在努力
Hi,欢迎光临安安博客

去除链接 以及input点击时的虚线框,防止点击input产生虚线框

去除链接  以及input点击时的虚线框:

$("a").focus( function() { this.blur(); } );
$("input:radio").focus( function() { this.blur(); } );
$("input:checkbox").focus( function() { this.blur(); } );

 

防止点击input产生虚线框

onclick = "this.blur();"

举例:

<input type="submit" name="button" id="button" value="登陆" onfocus = this.blur() />
<input type="submit" name="button" id="button" value="关闭" onfocus = this.blur() />

单选表单

<Form action="" method="post">
<label><input type="radio" name="q" value="1" />1</label>
<label><input type="radio" name="q" value="2" />2</label>
<label><input type="radio" name="q" value="3" />3</label>
<input type="submit" value="提交 />

< input > 内加 onFocus="this.blur()"就行了

发表评论 抢沙发