关于文本框输入问题 我在文本框中输入一串数字,我想在输入到第五位得时候显示是否何规定得数值一致。我应该怎么做,最好有适量得代码说明。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .aspx<asp:TextBox ID="tb" runat="server" />.cstb.Attributes.Add("onkeyup", "check(this)");js:function check(o){ if (o.value.length == 5) { //检查 }} if (o.value.length == 5)==============>if (o.value.length % 5 == 0) <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="第五位必须是5..." ValidationExpression="\d{4}5\d*"></asp:RegularExpressionValidator> <asp:Button ID="Button1" runat="server" Text="Button" /> OA短消息提醒功能功能怎么实现?即时提醒! SqlDataSource控件 关于RowDataBound ()事件的问题 有谁用过AspnetMenu控件吗? c# LumiSoft.Net.POP3接受邮件出现接收不到附件问题 使用汇编语言可以做网页么 关于asp.net chart控件的一些小问题 请问:如何为存在的Tabstrip动态的增加一项?谢谢 aspx不能在ie正常显示的问题 将一个datagrid放在table中实现内部滚动,如何实现行选择的时候定位?? 在datagrid中插入dropdownlist,请教对每行dropdownlist数据操作问题
<asp:TextBox ID="tb" runat="server" />.cs
tb.Attributes.Add("onkeyup", "check(this)");js:
function check(o)
{
if (o.value.length == 5)
{
//检查
}
}
==============>
if (o.value.length % 5 == 0)
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="第五位必须是5..." ValidationExpression="\d{4}5\d*"></asp:RegularExpressionValidator>
<asp:Button ID="Button1" runat="server" Text="Button" />