一、
$('#reset').click(function() {
$('#form')[0].reset();
});
$("#form")取得id为form的jQuery对象
$("#form")[0]可以把这个jquery对象转成html对象
后面的.reset()方法不是jquery对象的方法,但是是html对象的方法。
二、
$(function(){ $("#reset").click(function(){ $(':input','#form') .not(':button,:submit,:reset,:hidden') .val('') .removeAttr('checked') .removeAttr('selected'); }); });