js-form进行reset重置

(需要注意:做这个reset和submit时页面不能有这两个id和名称)

<form id="form1" name="formName" action=""></form>

一.通过form的id

document.getElementByIdx_x("form1").reset();

二.通过form的name

document.formName.reset();
原文地址:https://www.cnblogs.com/hwaggLee/p/4598429.html