js简单的正则表达式,不行的话js判断也行啊 <input id="Text1" type="text" runat="server" maxlength="6" />我在前面的2位必须是大写字母A-Z, 后面的4位必须是数字,输入的字符必须满5位 不满5位也会报错,哪位高手能提供以下啊·谢谢啦 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 window.onload=function(){ document.getElementById("Text5").onblur=function(){ var reg = /^[A-Z]{2}\d{3,4}$/; if(reg.test(this.value)) alert("yes"); else alert("no"); } } <head><script type="text/javascript"> window.onload=function(){ document.getElementById("Text5").onblur=function(){ var reg = /^[A-Z]{2}\d{3,4}$/; if(reg.test(this.value)) alert("yes"); else alert("no"); } }</script></head> 如何自定义FileUpLoad上显示的文字? 想把CheckBoxList中的项,改成DropDownList,怎么办? 点击按钮,数据提交后,能否让页面显示一个动画3秒,再显示服务器返回的数据? 正则排除字符串 根据条件显示控件 页面跳转问题 水晶报表付值问题 技术问题 怎樣將服務器上的ASP.NET(C#)工程﹐復制一份到本機上開發調試? 为什么图片显示不稳定,有时能显示,有时不能显示 求助 子夜 孟子等高手mvc 3.0 中使用ckeditor 提交数据时出错 浏览器阅读PDF文件 提示“拒绝访问"!!!!
document.getElementById("Text5").onblur=function(){
var reg = /^[A-Z]{2}\d{3,4}$/;
if(reg.test(this.value))
alert("yes");
else
alert("no");
}
}
<script type="text/javascript">
window.onload=function(){
document.getElementById("Text5").onblur=function(){
var reg = /^[A-Z]{2}\d{3,4}$/;
if(reg.test(this.value))
alert("yes");
else
alert("no");
}
}
</script>
</head>