To obtain the calculated style in a CSS element (that is, the final style after cascading), browsers that support W3C can use the document.defaultView.getComputedSyle method. This method accepts two parameters. The first parameter is the element to be styled, and the second parameter is a pseudo-element string (for example: ":after". If there is none, it is set to null. This method returns a StyleSheetDeclaration object, and the final style property value is obtained through the getPropertyValue(propertyName) of the object. Note that the proprtyName here is of type wrold-world (eg background-color). In IE, the element.currentStyle[propertyName] method is used. Note that the propertyName here is of the worldWorld type (such as: backgroundColor). |
<<: What is the use of the enctype field when uploading files?
>>: JavaScript implementation of magnifying glass details
Many netizens often ask why their websites always ...
The Core Asset Management Project requires el-tra...
Preface Adding drag and drop functionality is a g...
Table of contents 1. Use closures 2. Use ES6 clas...
1. What affects database query speed? 1.1 Four fa...
It's the end of the year and there are fewer ...
Less is More is a catchphrase for many designers....
This article example shares the specific code of ...
download: Step 1: Open the website (enter the off...
This is my first time using the element framework...
1. Spring boot does not support jsp jar package, ...
/***************** * proc file system************...
As shown in the figure: Check port usage: sudo ne...
We are not discussing PHP, JSP or .NET environmen...
Table of contents 【Effect】 【Implementation method...