【发布时间】:2013-07-02 02:41:08
【问题描述】:
我是 HTML5 新手...
我在电子邮件模式属性方面遇到了一些问题......
1)如果我在电子邮件字段中提供 user@gmail.com... 之类的输入..
2)它不接受值并显示“模式不匹配”..
帮我解决这个问题....
这是Html的sn-p
<form name='f1' method="POST" action="" >
<div id="fp">
<span style="margin-left:-50px">Email:</span>
<span><input class="input" type="email" name="Email" placeholder="Enter mailID" required pattern="^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" ></span><br>
<input type="submit" name="submit" value="submit">
</div>
</form>
任何建议都可以接受....
【问题讨论】:
-
看看haacked.com/archive/2007/08/21/…——它包含了很好的有效电子邮件地址示例,例如
"Abc@def"@example.com(其中一个不错的)。
标签: regex html html-email email-validation html-input