日期:2014-05-17  浏览次数:21177 次

提交信息后发现文本框内容还存在怎样清除
提交信息后发现文本框内容还存在怎样清除

------解决方案--------------------
<input type= "button " onClick= "show(); return false; " value= "提交 " />

dispose_demand---这个是你form的名字,MAJOR_IDEA是你需要清除的页面上的内容的名字
比如我的MAJOR_IDEA就是
<input type= "text " id= "MAJOR_IDEA " name= "MAJOR_IDEA " />

<script>
function show()
{
window.document.dispose_demand.MAJOR_IDEA.value= " "
window.document.dispose_demand.APPLY_TIME_start.value= " "
window.document.dispose_demand.APPLY_TIME_end.value= " "
window.document.dispose_demand.WISH_FINISH_TIME_start.value= " "
window.document.dispose_demand.WISH_FINISH_TIME_end.value= " "
window.document.dispose_demand.IT_UNDERTAKER.value= " "
window.document.dispose_demand.PHASE.value= " "
}
</script>

OK了吗
------解决方案--------------------
ASP_sem() 的写法不对,你这样没提交就清空了,而且onclick是return false,type是button,根本是无法提交的
应该是这样

<form id= "YoutForm " action= "???.asp " onsubmit= "dispose() ">
<input type= "text " id= "aaa " name= "aaa " value= "Your Data " />
.....
<input type= "submit " value= "提交 " />
</form>
<script>
function dispose() {
//设置1秒以后清空数据
setTimeOut(new Function( "clear() "),1000);
}
function clear() {
document.getElementById( "aaa ").value= " ";
}
</script>