reset是复位,不是清空,你应该明白这个单词的意思

解决方案 »

  1.   

    在当前页面中是可以用reset按钮清空所有的文本填写的内容,但是只要重定向回到本页面时,reset按钮就没作用了
      

  2.   

    <input type=reset value="重置">
      

  3.   

    reset的意思回到原来的状态
    1.如果原来有数据,回到原来是什么数据就还显示什么数据
    2.如果原来没有数据,这时就相当于清空了
      

  4.   

    reset Method  Internet Development Index --------------------------------------------------------------------------------Simulates a mouse click on a reset button for the calling form.SyntaxFORM.reset()
    Return ValueNo return value.ResThe reset method fires the onreset event on the form.ExampleThis example demonstrates how to use the reset method for a form object. When the button is pressed, the form is reset, resulting in the onreset event call on the form object. The onreset event calls an event handler which in turn adds the text Resetting form. to the text area below.HideExample<HTML>
    <HEAD>
    <SCRIPT>
    function doReset(){
    oTextArea1.value += "Resetting form.  ";
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <DIV id="oDiv1"
    style="border:1px solid black; background:#EEEEEE; padding:10px;">
    <B>Form</B>
    <FORM name="form1" onreset="doReset();">
    <b>Enter some text:</b> <INPUT type="text" name="oText1" value=""><BR><BR>
    <BUTTON onclick="form.reset();">form.reset()</BUTTON>
    </FORM>
    </DIV>
    <B>Text area</B><BR>
    <TEXTAREA id="oTextArea1" value="" rows="5" cols="75"></TEXTAREA>
    </BODY>
    </HTML>
    Show Me
    Standards InformationThis method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 . Applies To[ Object Name ] 
    Platform Version 
    Win16:  
    Win32:  
    Windows CE:  
    Unix:  
    Mac:  
    Version data is listed when the mouse hovers over a link, or the link has focus. 
     FORM 
    Move the mouse pointer over an element in the Applies To list to display availability information for the listed platforms. 
      

  5.   

    <script language="JavaScript">
      function FormReset(theform){
         //theform is the form's name
         if(theform=="")
           return false;
         if(document.forms(theform) != undefined)
           document.forms(theform).reset();
      }</script>
      

  6.   

    不同页面?<html>
    <body>
    <form>
    <script>
    var win=window.open("about:blank","","")
    win.document.write("<input type=button onclick='window.parent.document.getElementsByTagName(\'FORM\')[0].reset()'>")
    </script>
    <input type=text id='test'>
    </form>
    </body>
    </html>