jquery函数和javascript函数的区别
时间:2014-12-17 16:00:09
收藏:0
阅读:163
一、窗口加载: >>
在 JavaScript 中,您可以分配一个函数以处理窗口加载事件: JavaScript 方式: function myFunction() { var obj=document.getElementById("h01"); obj.innerHTML="Hello jQuery"; } onload=myFunction; 等价的 jQuery 是不同的: jQuery 方式: function myFunction() { $("#h01").html("Hello jQuery"); } $(document).ready(myFunction);
评论(0)