Home > Web Front-end > JS Tutorial > body text

Discussion on Small Issues in JS and CSS Loading_Basic Knowledge

WBOY
Release: 2016-05-16 17:12:19
Original
1231 people have browsed it

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...
Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!