this.TextBox1.Attributes.Add("Value","查找评论内容或评论人");
this.TextBox1.Attributes.Add("OnFocus", "if (this.value=='查找评论内容或评论人') this.value='';");
this.TextBox1.Attributes.Add("OnBlur", "if (this.value=='') this.value='查找评论内容或评论人';");
this.TextBox1.Attributes.Add("OnFocus", "if (this.value=='查找评论内容或评论人') this.value='';");
this.TextBox1.Attributes.Add("OnBlur", "if (this.value=='') this.value='查找评论内容或评论人';");
本文介绍了一种在网页中使用文本框实现评论内容或评论人的查找功能的方法。通过设置TextBox控件的Attributes属性,实现了默认提示文字“查找评论内容或评论人”,并在获取焦点时清空默认文字、失去焦点时恢复默认文字的功能。

被折叠的 条评论
为什么被折叠?



