<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<title>Form 表單樣式設計與輸入 驗證</title>
<style type="text/css">
</style>
</head>
<body>
<h3>zhu ce zhang hao<h3>
<form onsubmit="alert('sent')">
zhanghao:
<input type="text" required placeholder="4~12 文字" pattern ="[0-9a-zAZ]{4,12}"/>
<span class="ok">ok</span><br />
password:
<input type="password" required pattern="[0-9a-zA-Z]{8,16}"/>
<span class="ok">ok</span><br />
email:
<input type="email" required />
<span class="ok">ok</span><br />
tel:
<input type="text" pattern="[0-9]{8,16}" /><br />
性別:
男:<input type="radio" name="gender" value="male" required/>
女:<input type="radio" name="gender" value="male" required/><br />
誕生日:
<select>
<option value="">
<option value="">1990</option>
<option value="">2000</option>
</select><br /><br />
<input type="submit" value="send" />
</form>
</body>
</html>