【发布时间】:2010-08-03 19:21:34
【问题描述】:
jQuery 中的$(this) 和this 有什么区别?这里有两种不同的用法:
$(document).ready(function() {
$("#orderedlist").find("li").each(function(i) {
$(this).append( " BAM! " + i );
});
});
$(document).ready(function() {
// use this to reset several forms at once
$("#reset").click(function() {
$("form").each(function() {
this.reset();
});
});
});
【问题讨论】:
标签: jquery