Several ways to remove the dotted box that appears when clicking a link

Several ways to remove the dotted box that appears when clicking a link
Here are a few ways to remove it:

Add the link directly
onfocus="this.blur()".
<a href="#" onfocus="this.blur()">Link</a>

CSS Implementation

Copy code
The code is as follows:

a{blr:expression(this.onFocus=this.close());} /* Only supports IE, too much use will result in low efficiency*/
a{blr:expression(this.onFocus=this.blur());} /* Only supports IE, too much use will result in low efficiency*/
a:focus { -moz-outline-style: none; } /* IE does not support */

htc implements IE support

Copy code
The code is as follows:

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

Call a {behavior:url(the path address of the htc file)}

Implemented through JavaScript traversal

Copy code
The code is as follows:

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

5. For WordPress, you can use the internal JQuery framework to remove

Copy code
The code is as follows:

$("a").bind("focus",function(){
if(this.blur){ //If this.blur is supported
this.blur();
}
});

<<:  Two ways to manage volumes in Docker

>>:  The question of whether a tag opens a new page. The opening status of major websites is summarized

Recommend

Implementation of MySQL Shell import_table data import

Table of contents 1. Introduction to import_table...

MySQL conditional query and or usage and priority example analysis

This article uses examples to illustrate the usag...

ReactRouter implementation

ReactRouter implementation ReactRouter is the cor...

Summary of several error logs about MySQL MHA setup and switching

1: masterha_check_repl replica set error replicat...

VMware + Ubuntu18.04 Graphic Tutorial on Building Hadoop Cluster Environment

Table of contents Preface VMware clone virtual ma...

How to deploy MongoDB container with Docker

Table of contents What is Docker deploy 1. Pull t...

Let IE support CSS3 Media Query to achieve responsive web design

Today's screen resolutions range from as smal...

JavaScript to implement drop-down list selection box

This article example shares the specific code of ...

How many common loops do you know about array traversal in JS?

Preface As a basic data structure, arrays and obj...

JS removeAttribute() method to delete an attribute of an element

In JavaScript, use the removeAttribute() method o...

A Preliminary Study on JSBridge in Javascript

Table of contents The origin of JSBridge The bidi...

Make your website automatically use IE7 compatibility mode when browsing IE8

Preface To help ensure that your web pages have a ...

In-depth understanding of the matching logic of Server and Location in Nginx

Server matching logic When Nginx decides which se...

Develop a vue component that encapsulates iframe

Table of contents 1. Component Introduction 2. Co...