2019年8月4日 星期日

$(document).ready equivalent without jQuery

哦這是什麼爛標啊…呵呵呵,不要小看這個爛標,在SO上這個問題可是被問了一次又一次,問到不要不要的

總之一句話,在 html 文件最後宣告的即時函數,會在文件載入完畢後才執行,不需要特別處理。

有兩篇千餘個讚的SO都在講這件事:

https://stackoverflow.com/questions/9899372/pure-javascript-equivalent-of-jquerys-ready-how-to-call-a-function-when-t

https://stackoverflow.com/questions/799981/document-ready-equivalent-without-jquery


沒有留言:

張貼留言