無味
发布于 2015-06-24 / 2 阅读
0

js-form进行reset重置-243573295

 

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

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

 

一.通过form的id

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

 

二.通过form的name

document.formName.reset();