在jQuery中,重置表單出現的問題ide
$('#myform').reset()
應該是能夠的,但遺憾的是,不行,據網上說JQuery中沒有reset方法。測試
看到有一種方法,經過調用 DOM 中的reset方法來重置表單。orm
$('#myform')[0].reset()
不過,我沒測試成功,不知道是不是文件選擇框的問題,提供另一種思路。get
加reset按鈕input
<input type="reset" id="frmReset" style="display:none;">it
調用form
$('#frmReset').click();class
![j_0028.gif](http://static.javashuo.com/static/loading.gif)