如果在加载 DOM 后将以下脚本动态插入到页面中怎么办......
$( document ).ready(function() {
console.log("Will anybody see me?");
});
该调试语句是否仍会触发?
如果在事件触发后添加document.ready
处理程序,则会立即调用它。