參考:
jquery 表單 清空
$(':input','#myform') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected');這個(gè)js是可以實(shí)現(xiàn)清空表單中填寫及傳入的值的,但要注意:
1、jq實(shí)現(xiàn),此<input />不能放在form表單內(nèi)??;
2、直接寫在onclick屬性中即可
新聞熱點(diǎn)
疑難解答
圖片精選