Run JavaScript function when the DOM is “ready”?

前端 未结 7 2117
一生所求
一生所求 2020-12-03 10:04

I\'m using a JavaScript upload script that says to run the initialize function as soon as the DOM is ready. I currently have it working just fine with either a call to the f

相关标签:
7条回答
  • 2020-12-03 10:52

    You could also just move the <script> to the bottom of your page like this:

    </body>
        <main></main>
        <script>
            // code
        </script>
    </body>
    </html>
    
    0 讨论(0)
提交回复
热议问题