Home  >  Article  >  Web Front-end  >  Discussion on Small Issues in JS and CSS Loading_Basic Knowledge

Discussion on Small Issues in JS and CSS Loading_Basic Knowledge

WBOY
WBOYOriginal
2016-05-16 17:12:191238browse

In the js script, there are two window.onload

Copy code The code is as follows:

window .onload = function(){
alert("aaa");
};

window.onload = function(){
alert("bbb");
} ;

will only execute one. This is the setting of the function itself. It is worth noting that what pops up is not aaa, but bbb. The last

in css is executed. In the file, in the css style
copy the code The code is as follows:

#checks{
padding-left:20px;padding-top:16px;margin:auto;
}
#checks{
padding-left:80px;padding-top:38px;margin:auto;
}

is also the later style that takes effect. If the padding-left in the second one is removed, use the padding-left in the first




This is the first one to take effect, and it is different from the above two

I hope someone can help explain...
Statement:
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