Form对象有一个函数就叫reset(),可以直接调用。

解决方案 »

  1.   

    楼上,是有个方法,函数跟方法不同的。的确有这个方法,formname.reset();
      

  2.   

    这个方法我早就试过了!!
    form的name为frm
    我用了  frm.reset();的语句,调试时它提示我"出现运行期错误对象不支持此属性或方法"!!到底是怎么回事呀??
    帮忙帮忙有哪位老兄成功了,,最后是将html源文件贴出来!!!谢谢!!
      

  3.   

    it should work,<form name="frm">
    <input type="text" name="ee" value="">
    </form>
    <input type="button" value="reset" onclick="frm.reset()" language="javascript">
      

  4.   

    楼上的:
        你这只是点击RESET按钮后产生的RESET效果现在我需要的是在javascript function中实现这种reset效果因为我页面中达达到某种条件时,是页面会强行的自动reset表单,,而不是一直去等待用户去点击reset按钮!!谢谢你的好意,
    有谁能能达到我所要求的页面效果吗??
    高手请赐招!!
      

  5.   

    你在函数的条件语句后面加上一句formname.reset();不就行了吗?
      

  6.   

    you can call frm.reset() in your function anytime you want, no need to wait for the user to click on the button
      

  7.   


    <form name=form1>
     <input type=reset name=reset1>
    </form>
    function MyReset()
    {
    document.form1.reset1 .click ();
    }