邮件地址的正则,求各位大神检查检查! /^[A-Za-z0-9]+([-|_]?)*(\.[A-Za-z0-9]*)?@[A-Za-z0-9]+([-|_]?)*[A-Za-z0-9]+\.[A-Za-z]+(\.[A-Za-z]*)?/ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var re=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; var re=/\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/试下这个 <html><head><script type="text/javascript">var email="@yahoo.com";myReg=/^[A-Za-z0-9]+([-|_]?)*(\.[A-Za-z0-9]*)?@[A-Za-z0-9]+([-|_]?)*[A-Za-z0-9]+\.[A-Za-z]+(\.[A-Za-z]*)?/if(email.match(myReg)){ myStr=email.bold().fontcolor("red");}else{ myStr=email.bold().fontcolor("green");}</script></head><body><script type="text/javascript">document.write(myStr)</script></body></html>用这个自己检查吧。 /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/这段连!#¥%……&*()这种代码都会放过,不合适,所以才自己写 \w 只包括 [A-Za-z0-9_]参考链接 http://www.yesky.com/imagesnew/software/vbscript/html/jsgrpRegExpSyntax.htm jqery隐藏没有设置属性的层 arguments[0] 是服务器段的东西啊 什么意思 关于用GetValueAt方法取数的问题 JS中为什么不能执行showMessage()中的信息啊? 像这样的左边菜单树要怎么做? 选择一个文件夹,显示文件文件夹所有文件名称。。。 IE支持问题 关于window.open的一个小问题? 这个代码里按回车的时候为什么总是有从主板发声? 高手请:如何在网页载入后,触发一个点击网页空白部分的事件,空白部分没有任何控件。 js中如何根据两个日期(字符串)计算天数 随鼠标移动的效果
试下这个
<head>
<script type="text/javascript">
var email="@yahoo.com";
myReg=/^[A-Za-z0-9]+([-|_]?)*(\.[A-Za-z0-9]*)?@[A-Za-z0-9]+([-|_]?)*[A-Za-z0-9]+\.[A-Za-z]+(\.[A-Za-z]*)?/
if(email.match(myReg))
{
myStr=email.bold().fontcolor("red");
}else
{
myStr=email.bold().fontcolor("green");
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(myStr)
</script>
</body>
</html>用这个自己检查吧。
这段连!#¥%……&*()这种代码都会放过,不合适,所以才自己写
参考链接 http://www.yesky.com/imagesnew/software/vbscript/html/jsgrpRegExpSyntax.htm