设一个隐藏的,然后修改onsubmit事件,如下:<form onsubmit=check(this) action=refresh.asp method=post>
<input type=hidden name=msg>
<input name=tmp>
</form>
<script>
function check(theForm){
theForm.msg.value=theForm.tmp.value
theForm.tmp.value="";
}
</script>

解决方案 »

  1.   

    设一个隐藏的,然后修改onsubmit事件,如下:<form onsubmit=check(this) action=refresh.asp method=post>
    <input type=hidden name=msg>
    <input name=tmp>
    </form>
    <script>
    function check(theForm){
    theForm.msg.value=theForm.tmp.value
    theForm.tmp.value="";
    }
    </script>
      

  2.   

    onsubmit="document.all('textname').value='';"
    or
    document.all('submitbuttonname').onclick="document.all('textname').value='';"
      

  3.   

    onsubmit="document.all('textname').value='';"
    or
    document.all('submitbuttonname').onclick="document.all('textname').value='';"