<html>
<body>
<form id="myForm" action="/demo/htmldom/action_page.php" novalidate>
电邮:<input type="email" name="user_email">
<input type="submit">
</form>
<p>单击“试一试”按钮可查看提交时是否应验证表单数据。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myForm").noValidate;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>