asp.net中单击textbox自动清除其内容

来源:互联网 发布:阿里云购买后怎样设置 编辑:程序博客网 时间:2024/05/16 17:08

 在cs后台代码中直接添加:

    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox1.Attributes.Add("OnClick", "this.value =/"/"");
    }