圖1
圖2
圖3
圖4
圖5
這是使用 Tailwind CSS 制作的一款流行的注冊界面
左邊是示意圖/介紹圖/廣告圖,右邊是注冊表單。
頁面為響應式,兼容 PC、Pad 和手機模式。
由于使用 Tailwind CSS 2.0.3 版本,所以不兼容 IE 瀏覽器。
演示地址:
https://www.361zy.com/302.html
下載地址:
https://www.06dn.com/s/kpCX
解壓碼:WFAmegqB
lt;head>
<meta charset="UTF-8">
<title></title>
<style>
td input[type="text"],td input[type="email"],td input[type="password"], td input[type="date"]{
width:98%;
}
</style>
<script>
function checkLength(){
var pwd=document.getElementById("pwd").value;
var spanLen=document.getElementById("spanLen");
if(pwd.length<=3&&pwd.length>0)
spanLen.innerHTML="弱";
else if(pwd.length<=6)
spanLen.innerText="中";
else
spanLen.innerText="強";
}
function checkPSW(){
var pwd1=document.getElementById("pwd").value;
var pwd2=document.getElementById("pwd2").value;
var pswInfo=document.getElementById("pswInfo");
if(pwd1!=pwd2)
pswInfo.innerText="兩次密碼不同"; // alert("兩次密碼不同");
else
pswInfo.innerText="";
}
</script>
</head>
<body>
<form>
<fieldset>
<legend>
用戶注冊頁面
</legend>
<table align="center" width="500px" >
<caption>用戶登錄信息</caption>
<tr>
<td width="20%" >用戶名</td>
<td width="40%"><input type="text" required="true" autofocus="true"></td>
<td width="40%">*</td>
</tr>
<tr>
<td>郵箱</td>
<td><input type="email" required="true"></td>
<td>*</td>
</tr>
<tr>
<td>密碼</td>
<td><input type="password" id="pwd" required="true" onkeyup="checkLength()"></td>
<td>* <span id="spanLen"></span></td>
</td>
</tr>
<tr>
<td>確認密碼</td>
<td><input type="password" id="pwd2" required="true" onblur="checkPSW()"></td>
<td align="left">* <span id="pswInfo" style="color: #c41a15;"></span></td>
</tr>
</table>
<br>
<br>
<table align="center" width="500px">
<caption>用戶基本信息</caption>
<tr>
<td width="20%">性別</td>
<td width="40%">
<select size="1">
<option>男</option>
<option>女</option>
</select>
</td>
<td width="40%"></td>
</tr>
<tr>
<td>出生年月</td>
<td><input type="date"></td>
</tr>
<tr>
<td>住址</td>
<td><input type="text"></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="注冊新用戶">
</td>
<td>
<input type="reset" value="重置">
</td>
</tr>
</table>
</fieldset>
</form>
</body>
*請認真填寫需求信息,我們會在24小時內與您取得聯系。