设一个隐藏的,然后修改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>
<input type=hidden name=msg>
<input name=tmp>
</form>
<script>
function check(theForm){
theForm.msg.value=theForm.tmp.value
theForm.tmp.value="";
}
</script>
<input type=hidden name=msg>
<input name=tmp>
</form>
<script>
function check(theForm){
theForm.msg.value=theForm.tmp.value
theForm.tmp.value="";
}
</script>
or
document.all('submitbuttonname').onclick="document.all('textname').value='';"
or
document.all('submitbuttonname').onclick="document.all('textname').value='';"