jq, js is easy to remember the concept of confusion -- element attributes

1. First of all, JQ's .css() is very convenient to obtain and design the properties of JQ elements. And get the value calculated by the computer,

2. JQ's .attr() gets the attributes set in the JQ element line.

3. The getAttribute of js obtains the value of the element attribute excluding the system default and css style sheet settings

4. js gets the value of element calculation or use getComputedStyle (standard browser), currentStyle (ie8-)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324740357&siteId=291194637