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

Vue implements the browser-side code scanning function

background Not long ago, I made a function about ...

InnoDB engine redo file maintenance method

If you want to adjust the size and number of Inno...

Does the website's text still need to be designed?

Many people may ask, does the text on the website...

Basic ideas and codes for implementing video players in browsers

Table of contents Preface Summary of audio and vi...

Summary of the 10 most frequently asked questions in Linux interviews

Preface If you are going to interview for a Linux...

Summary of several replication methods for MySQL master-slave replication

Asynchronous replication MySQL replication is asy...

Comparison of the usage of EXISTS and IN in MySQL

1. Usage: (1) EXISTS usage select a.batchName,a.p...

How to add Tomcat Server configuration to Eclipse

1. Window -> preferences to open the eclipse p...

Detailed explanation of where Docker saves log files

Table of contents Where are the logs stored? View...

A brief discussion on the underlying principle of mysql join

Table of contents join algorithm The difference b...

Implementation example of nginx access control

About Nginx, a high-performance, lightweight web ...

Detailed explanation of how to install MariaDB 10.2.4 on CentOS7

CentOS 6 and earlier versions provide MySQL serve...

Introduction to the deletion process of B-tree

In the previous article https://www.jb51.net/arti...

MySQL 8.0.13 manual installation tutorial

This article shares the manual installation tutor...