写法1:
$(document).ready(function(){
// jQuery methods go here...
});
写法2:
$().ready(function(){
// jQuery methods go here...
});
写法3:
$(function(){
// jQuery methods go here...
});
参考:http://www.w3school.com.cn/jquery/event_ready.asp;