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();

 

posted @ 2015-06-24 18:54  243573295  阅读(1135)  评论(0编辑  收藏  举报