Small problems in JS and CSS loading are discussed

  • 2020-03-29 23:59:52
  • OfStack

In the js script, there are two window.onloads
 
window.onload = function(){ 
alert("aaa"); 
}; 

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

There's only one that's going to be executed, that's the setting of the function itself, and it's worth noting that instead of an aaa, what pops up is a BBB, and the last one is being executed

In the CSS file, in the CSS styles
 
#checks{ 
padding-left:20px;padding-top:16px;margin:auto; 
} 
#checks{ 
padding-left:80px;padding-top:38px;margin:auto; 
} 

Again, the latter style works, so if the padding left in the second one is removed, then the padding left in the first one is used

HTML tags in the

< Td style = "padding - left: 10 px; Padding - top: 8 px; Margin: auto;" Style = "padding - left: 20 px; Padding - top: 16 px; Margin: auto;" > < / td>

This is the first one that works, which is different from the two above

Would like someone to explain...

Related articles: