Li Yuan Bo
啥都会点……-李元波
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--加novalidate属性,禁用浏览器对表单字段的验证--><form method="post" id="form_id1" novalidate><!-- 第一种required写法--> <input class="form-control" id="id1" type="text" name="name1" placeholder="项目名称1" required="required"> <button type="submit">保存</button>
</form>
<!--不加novalidate属性,表单会提示--><form method="post" id="form_id2" ><!-- 第二种required写法--> <input class="form-control" id="id_name2" type="text" name="name2" placeholder="项目名称2" required> <button type="submit">保存</button>
</form>
发表评论: