<script language="javascript">
function HideLabel() {
document.getElementById('LabelError').style.display="none";
}
</script>上面是js代码
下面是定义:<SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><font color="white">用户名:<asp:TextBox id="TextBoxUserName" runat="server" Width="108px" BorderStyle="None" Height="23px"
OnTextChanged="HideLabel()"></asp:TextBox></font></SPAN>请问错在什么地方?多谢!
function HideLabel() {
document.getElementById('LabelError').style.display="none";
}
</script>上面是js代码
下面是定义:<SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><font color="white">用户名:<asp:TextBox id="TextBoxUserName" runat="server" Width="108px" BorderStyle="None" Height="23px"
OnTextChanged="HideLabel()"></asp:TextBox></font></SPAN>请问错在什么地方?多谢!
解决方案 »
- detailsview中如何动态将某一字段显示为Dropdownlist控件?
- 求救:哪位有oracle for .net的組件 ODP 9.2.0.401這個版本啊
- 问到没有分了,,,,,急!!
- 请好心帮忙,asp.net有没有一个方法把字符串的特殊字符替换成合法字符,比如空格变成 换行变成<br />把<和>都替换成合法的.
- 能不能实现这样一个确认对话框!
- 不用 数据库自动编号的 ID 来添加记录的时候,如何对表进行锁定??
- 莱鸟发问:一个简单的循环问题(在线,立结帖)
- 关于参数的传递问题!!!急救!!!!
- 从来没有费这么大的力气研究一个控件!
- 请熟悉水晶报表的各位提供一个比较全的资料,当然再有一个事例是最好的。
- 在控件呈现时先执行CreateChildControls还是OnDataBinding,高手请帮忙
- 如何用asp.net实现防止用户刷新页面?
改为
//html代码
<script language="javascript">
function HideLabel()
{
document.getElementById('LabelError').style.display="none";
}
</script><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><font color="white">用户名:<asp:TextBox id="TextBoxUserName" runat="server" Width="108px" BorderStyle="None" Height="23px"></asp:TextBox></font></SPAN>
//后台cs代码
private void Page_Load(object sender, System.EventArgs e)
{
this.TextBoxUserName.Attributes.Add("onchange","HideLabel();");
}
this.Control.Attributes.Add(......);