6.10 验证邮箱

  • HTML 5 自带属性,校验邮箱,原文中的方法;
  • 略;
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
</head>
<body>
<form name="myForm" action="demo_form.php" onsubmit="return check()" method="post">
    <label><input type="email" id="code" name="code" ></label>
    <input type="submit" value="提交">
</form>
</body>
</html>