以下 jQuery 文档就绪函数有什么区别(如果有):
$("document").ready(function() {});
和 $(function() {});
最佳答案
它们是等价的,后者是第一个的简写形式。
All three of the following syntaxes are equivalent:
$(document).ready(handler) $().ready(handler) (this is not recommended) $(handler)
关于jQuery 文档就绪函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7479817/