在asp.net里,点击"清空"button时,所有TextBox的Text变空,这是如何实现
答案:3 悬赏:30
解决时间 2021-02-15 10:06
- 提问者网友:房东的猫
- 2021-02-14 10:25
在asp.net里,点击"清空"button时,所有TextBox的Text变空,这是如何实现
最佳答案
- 二级知识专家网友:猎杀温柔
- 2021-02-14 11:34
在button清空时间里写
this.txtbox.Text="";
或
this.textBox1.Clear();
或
this.txtbox.Text=null;
所有的TextBox控件都写
this.txtbox.Text="";
或
this.textBox1.Clear();
或
this.txtbox.Text=null;
所有的TextBox控件都写
全部回答
- 1楼网友:木子香沫兮
- 2021-02-14 12:05
是这样的啊,我刚才也试过了,能清空,
protected void button1_click(object sender, eventargs e) { this.textbox1.text = ""; }
- 2楼网友:修女的自白
- 2021-02-14 11:41
<script type = "text/javascript" src = "../JS/jquery-1.4.2.min.js"></script>
<script type = "text/javascript">
function ClearText() {
$("#btn_rewrite").click(function(){
$(".txt_len").each(function(){
$(this).val('');
});
});
}
</script>
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯