欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

jquery 初始化方法与js的onload区别

shiping1 的头像

看书时注意到下面两条语句的功效是相同的,

$(function(){alert("hello!");});  
$(document).ready(function(){alert("hello!");});
jquery的初始化方法 可以执行多次(理论上无数次)
 
js的onload方法 只能执行多次
普通分类: