<form id="test">
<input type="text" />
</form>
重置表单的方法:
错误写法:
$('#test').reset();
这也是在JS里的正确写法,但是在jquery里却不能这么用,要注意
正确用法:
$('#test')[0].reset();
<form id="test">
<input type="text" />
</form>
重置表单的方法:
错误写法:
$('#test').reset();
这也是在JS里的正确写法,但是在jquery里却不能这么用,要注意
正确用法:
$('#test')[0].reset();