就是点击个个颜色,然后使得页面的背景颜色变成同样的颜色
4.上图中的效果使用简单的代码就可以完成了,而且在IE,FF中的效果是同样的,这里就只贴出jquery中的代码了,非常的简单的
Home Web Front-end JS Tutorial A detailed discussion on the differences between jquery in IE and FF browsers_jquery

A detailed discussion on the differences between jquery in IE and FF browsers_jquery

May 16, 2016 pm 05:35 PM
ie jquery Firefox

1. Today I suddenly thought about the benefits of jquery that I haven’t used yet, so I practiced it a bit. Who knows, I encountered the problem of the difference between jquery in IE and FF browsers. Okay, without further ado, I will come across it. The question is
2. Most people who have used jquery know that the browsing effect on FF is just good, but the effect of these new effects on IE is not satisfactory.
3. An effect of today’s practice is like this
A detailed discussion on the differences between jquery in IE and FF browsers_jquery
Is to click on each color, and then make the background color of the page change to the same color
4. Use the effect in the picture above It can be completed with simple code, and the effect is the same in IE and FF. Here I only post the code in jqueススy, it is very simple

Copy the code The code is as follows:



The following is the code in HTML
Copy the code The code is as follows:



  


 


 

 


 


 


 

Restore

The css style below will not be posted. I believe everyone knows it.
Let me talk about another different code, which made me understand the relationship between IE and FF. Use of jqueスス・

A detailed discussion on the differences between jquery in IE and FF browsers_jquery1.
Seeing the difference between this picture and the picture above, I believe you can easily find it out. Yes, the four corners of this small icon are all curved. In order to complete this curve, I used a js , this js is this "jquery.curvycorners.source.js" through the method

Copy the code The code is as follows:
$(document).ready(function(){
settings = {
tl: { radius: 10 },
tr: { radius: 10 },
bl: { radius : 10 },
br: { radius: 10 },
antiAlias: true,
autoPad: true,
validTags: ["span"]
}
$('. myBox').corner(settings);
$('.myBox1').corner(settings);
$('.myBox2').corner(settings);
$('.myBox3' ).corner(settings);
$('.myBox4').corner(settings);
$('.myBox5').corner(settings);
$('.myBox6'). corner(settings);
$('.myBox7').corner(settings);
});

This method is used to make the four corners of the above image into radians. Yes, but a problem arises
With this method, the effect of this js running in FF is very complete, but it has no effect when it appears on IE
I haven’t noticed it before, but after testing it today, I have a small opinion. Is the compatibility of IE not very good for some customized js? I have done a project before, and also customized a js, and then embedded it into the page through Script. The effect is very good in FF, but in There was no effect on IE, and I didn't care about it at the time. Through today's practice, I found out, "Is the compatibility of IE not very good for some customized js?" Is this true? Should we customize js as little as possible in the future? But if we don’t customize js, there will be a lot of code in the page? A little confused ING...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of jQuery reference methods: Quick start guide Detailed explanation of jQuery reference methods: Quick start guide Feb 27, 2024 pm 06:45 PM

Detailed explanation of jQuery reference method: Quick start guide jQuery is a popular JavaScript library that is widely used in website development. It simplifies JavaScript programming and provides developers with rich functions and features. This article will introduce jQuery's reference method in detail and provide specific code examples to help readers get started quickly. Introducing jQuery First, we need to introduce the jQuery library into the HTML file. It can be introduced through a CDN link or downloaded

How to remove the height attribute of an element with jQuery? How to remove the height attribute of an element with jQuery? Feb 28, 2024 am 08:39 AM

How to remove the height attribute of an element with jQuery? In front-end development, we often encounter the need to manipulate the height attributes of elements. Sometimes, we may need to dynamically change the height of an element, and sometimes we need to remove the height attribute of an element. This article will introduce how to use jQuery to remove the height attribute of an element and provide specific code examples. Before using jQuery to operate the height attribute, we first need to understand the height attribute in CSS. The height attribute is used to set the height of an element

How to use PUT request method in jQuery? How to use PUT request method in jQuery? Feb 28, 2024 pm 03:12 PM

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

jQuery Tips: Quickly modify the text of all a tags on the page jQuery Tips: Quickly modify the text of all a tags on the page Feb 28, 2024 pm 09:06 PM

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: &lt

Use jQuery to modify the text content of all a tags Use jQuery to modify the text content of all a tags Feb 28, 2024 pm 05:42 PM

Title: Use jQuery to modify the text content of all a tags. jQuery is a popular JavaScript library that is widely used to handle DOM operations. In web development, we often encounter the need to modify the text content of the link tag (a tag) on ​​the page. This article will explain how to use jQuery to achieve this goal, and provide specific code examples. First, we need to introduce the jQuery library into the page. Add the following code in the HTML file:

How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page Mar 20, 2024 pm 09:21 PM

Recently, many win10 users have found that their IE browser always automatically jumps to the edge browser when using computer browsers. So how to turn off the automatic jump to edge when opening IE in win10? Let this site carefully introduce to users how to automatically jump to edge and close when opening IE in win10. 1. We log in to the edge browser, click... in the upper right corner, and look for the drop-down settings option. 2. After we enter the settings, click Default Browser in the left column. 3. Finally, in the compatibility, we check the box to not allow the website to be reloaded in IE mode and restart the IE browser.

How to tell if a jQuery element has a specific attribute? How to tell if a jQuery element has a specific attribute? Feb 29, 2024 am 09:03 AM

How to tell if a jQuery element has a specific attribute? When using jQuery to operate DOM elements, you often encounter situations where you need to determine whether an element has a specific attribute. In this case, we can easily implement this function with the help of the methods provided by jQuery. The following will introduce two commonly used methods to determine whether a jQuery element has specific attributes, and attach specific code examples. Method 1: Use the attr() method and typeof operator // to determine whether the element has a specific attribute

Firefox browser Firefox 110 stable version released: supports importing data from Opera and Vivaldi Firefox browser Firefox 110 stable version released: supports importing data from Opera and Vivaldi Mar 05, 2024 am 10:49 AM

The Linux version of Firefox has been updated to Firefox 110. This update supports importing data from Opera and Vivaldi browsers, enabling the GPU sandbox function in the Windows version, etc. In addition, it also greatly improves performance and security. Supports importing data from more browsers In addition to the currently supported Edge, Chrome and Safari browsers, the Firefox 110 version also adds the ability to import bookmarks, history and passwords from Opera, OperaGX and Vivaldi browsers. This feature provides convenience for all users considering switching to Firefox, allowing them to easily migrate important information they have saved in other browsers. Thus

See all articles