摘要: 参考jQuery官网API文档1、.attr()获取 :$( "a" ).attr( "href" );设置:$( "a" ).attr( "href", "allMyHrefsAreTheSameNow.html" ); $( "a" ).attr({ title: "all titles are the same too!", href: "somethingNew.html"})... 阅读全文
posted @ 2014-07-23 21:05 april吖~ 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 参考jQuery官网API文档$ 和 $() 的区别很重要:1、$(document).ready() 和 $(document).load() 的 区别: 前者等到DOM准备好了之后就会触发,后者必须等到整个网页(包括图片,iframe)准备好了才触发。 $(function(){ alert("hello jquery"); }); 是 $(document).ready(function(... 阅读全文
posted @ 2014-07-23 21:04 april吖~ 阅读(285) 评论(0) 推荐(0) 编辑