html5 form novalidate具体实例[网站美工]
本文“html5 form novalidate具体实例[网站美工]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
html5 form novalidate具体实例
formnovalidate novalidate
--><!doctype html>
<html>
<body><form action="demo_form.asp" method="get" id="user_form">
e-mail: <input type="email" name="userid" /><br />
<input type="submit" value="submit" /><br />
<input type="submit" formaction="demo_admin.asp" value="submit as admin" /><br />
<input type="submit" formnovalidate="true" value="submit without validation" /><br />
</form></body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset=utf-8 />
<title>html5 formnovalidate</title>
<style>
body, input, textarea {
font-family: "helvetica", arial, helvetica;
}
label {
display: block;
float: left;
clear: left;
text-align: right;
width: 100px;
margin-right: 10px;
}div { padding: 10px; }
fieldset { border: 1px solid #ccc; margin-bottom: 20px; }
</style>
</head>
<body>
<form>
<fieldset>
<legend>some bits about you</legend>
<div><label for="email">email:</label> <input id="email" name="email" type="email" required /></div><div><label for="url">homepage:</label><input id="url" type="url" name="url" /></div>
<div><textarea name="comment" cols="100" rows="5" required></textarea></div>
<div><input type="submit" value="save current state" formnovalidate /> <em>won't validate the form</em></div>
</fieldset><div><input type="submit" /> <em>i will validate the form</em></div>
</form>
</body>
</html>
以上是“html5 form novalidate具体实例[网站美工]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |