Css/js/jquery three ways to get rid of linked dotted boxes

Source: Internet
Author: User

CSS: Very poor compatibility.

The code is as follows

A:focus,input:focus {outline:none;}

In Firefox can use-moz-outline:none; or Outline:none; To remove it. So we can write this:

The code is as follows

A:focus {
Outline:none;
-moz-outline:none;
}

Direct add:

Onfocus= "This.blur ()"

You can also use the HTC file to add A.style.behavior properties. such as:

The code is as follows

<style>
A,img
{
Behavior:url (JS file address);
}
</style>

Write the following statement in the JS file

The code is as follows
<attach event= "onfocus" handler= "onfocus"/>
<script language= "JavaScript" >
function onfocus ()
{
This.blur ();
}
</SCRIPT>

JQ's writing:

  code is as follows &nbs P;

$ ("Input:not (input[type= ' text '],input[type= ' password ')"). Focus ( function () {
    this.blur ();

});

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.