$(document).ready(handler) $().ready(handler) (this is not recommended) $(handler) 相当于: $(document).ready(function(){}) $().ready(function(){}) (this is not recommended) $(function(){}) 只要DOM结构已完全加载时,脚本就可以运行.传递处理函数给.ready()方法,能保证DOM准备好后就执行这个函数,因此,这里是