如何清除HTML输入表单值 [英] How do I clear my HTML input form value
本文介绍了如何清除HTML输入表单值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谢谢..
我的尝试:
i尝试使用javascript来停止它和一些标签来清除html输入的值但是没有工作...
解决方案
document.getElementById(myForm ).reset();
试试这个
protected void Page_Load(object sender,EventArgs e)
{
if(!Page.IsPostBack)
{
// your code
}
}
希望它对您有所帮助。
after click on submit button i can easily saved all value but if page post back i can retreive those values again and i found in my database also if someone has any relevant info plz share it.
thanks..
What I have tried:
i tried javascript to stop it and some tags to clear the value of html inputs but not working...
解决方案
document.getElementById("myForm").reset();
try this
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //your code } }
hope it will helpfull for you.
这篇关于如何清除HTML输入表单值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文