什么是$(document).ready() jQuery等价的$(document).ready() ?
$(document).ready()
This works perfectly, from ECMA(这非常适合ECMA)
document.addEventListener("DOMContentLoaded", function() { // code... });
window.onload
$(document).ready
// alternative to DOMContentLoaded document.onreadystatechange = function () { if (document.readyState == "interactive") { // Initialize your application or run some code. } }
"interactive"
1.4m articles
1.4m replys
5 comments
57.0k users