语法:
form . reset ()
参数:
无
返回值:
无
说明:
重置一个表单( form )。即模拟重置按钮( INPUT type=reset )的一次单击( click )。同时激发 onreset 事件。
<form action="mailto:baby@rongshu.com?subject=DHTMLET(TM)" encType="text/plain" method="POST" name="oForm" onsubmit="alert('我被提交了');" onreset="alert('我被重置了');">
姓名: <input type=text size=24 name="username" id=oInput>
<br>
<br>
<input type=button value=" 提 交 " onclick="document.all('oForm').fireEvent('onsubmit');document.all('oForm').submit();">
<input type=button value=" 重 置 " onclick="document.all('oForm').reset();">
</form>
