点击重置按钮,清空表单所有内容

只要把type设置为reset即可,不需要设置click事件来清空每个输入框内容。

<button type="reset" >重置</button>

<input type="reset" value="重置" />
原文地址:https://www.cnblogs.com/xmm2017/p/13943869.html