這篇文章將為大家詳細(xì)講解有關(guān)H5如何制作一個(gè)注冊(cè)頁面,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

代碼如下:
<!DOCTYPE html>
<html>
<head>
<title>register.html</title>
<meta http-equiv="
key
words" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; char
set
=UTF-8">
<LINK rel="Shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/register.css" />
<script src="js/checkbox.js" type="text/
javascript
">
</script>
<script type="text/javascript">
function play(){
document
.getElementById("menu_item").style.
display
= "";
}
function noplay(){
document.getElementById("menu_item").style.display = "none";
}
function passwd(){
var pass = document.getElementById("password").value;
var tip = document.getElementById("tip");
if
(pass.length < 4) {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "差";
}
else
if (pass.length <= 8) {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "中";
}
else {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "高";
}
}
</script>
</head>
<body>
<p id="3" style="
position
: relative;
top
: 100px;
z-index
: 3;">
<
for
m id="f1"
action
="register.html" method="post">
<table align="center" cellspacing="0" class="table">
<tr class="thead">
<td align="center">
會(huì)員注冊(cè)
</td>
</tr>
<tr>
<td>
<table id="registertable" border="0px" align="center" border="0px" cellspacing="0" cell
padding
="5px">
<tr>
<tr>
<td align="right">
員工編號(hào):
</td>
<td align="
left
">
<input type="text" name="username" placeholder="用戶名"
require
d/>
</td>
</tr>
<tr>
<td align="right">
密 碼:
</td>
<td align="left">
<input type="password" name="password" id="password" placeholder="密碼" required
onkeyup
="passwd()"/>
<meter min="1" max="10" low="5" high="8" value="0" id="meter">
</meter>
<span id="tip"></span>
</td>
</tr>
<tr>
<td align="right">
密碼確認(rèn):
</td>
<td align="left">
<input type="password" name="password2" placeholder="確認(rèn)密碼" required/>
</td>
</tr>
<tr>
<td align="right">
生 日:
</td>
<td align="left">
<input type="
date
" name="borthday" />
</td>
</tr>
<tr>
<td align="right">
性 別:
</td>
<td align="left">
<input type="radio" name="g
end
er" value="0" checked/>男
<input type="radio" name="gender" value="1"/>女
</td>
</tr>
<tr>
<td align="right">
郵 箱:
</td>
<td align="left">
<input type="
email
" name="email" placeholder="郵箱" id="email" required/>
</td>
</tr>
<tr>
<td align="right">
手 機(jī):
</td>
<td align="left">
<input type="tel" pattern="[0-9]{11}" id="p" name="phone" placeholder="請(qǐng)輸入11位數(shù)字" />
</td>
</tr>
<tr>
<td align="right">
地 址:
</td>
<td align="left">
<input type="text" name="address" placeholder="地址"
list
="l"/>
<datalist id="l">
<option value="sh">上海</option>
<option value="bj">北京</option>
<option value="js">江蘇</option>
<option value="zz">鄭州</option>
<option value="sz">深圳</option>
</datalist>
</td>
</tr>
<tr>
<td align="right">
個(gè)人網(wǎng)頁:
</td>
<td align="left">
<input type="url" name="page" placeholder="主頁網(wǎng)址" />
</td>
</tr>
<tr>
<td align="right">
起床時(shí)間:
</td>
<td align="left">
<input type="
time
" name="bed"
onblur
="pro()"/>
</td>
</tr>
<tr>
<td align="right">
頭像:
</td>
<td align="left">
<input type="
file
" id="f" accept="image/jpeg"
onchange
="show()"/><span><img id="img" src=""
width
="60"
height
="60" /></span>
<script>
function show(){
var file = document.getElementById("f").files[0];
var fileReader =
new
FileReader();
fileReader.readAsDataURL(file);
fileReader.
onload
= function(){
document.getElementById("img").src = fileReader.result;
}
}
</script>
</td>
</tr>
<tr>
<td colspan="2">
<details>
<p>
允許注冊(cè)
<mark>
許可證
</mark>信息
</p>
<summary>
注冊(cè)許可信息
</summary>
</details>
</td>
</tr>
<tr>
<td align="right">
驗(yàn)證碼
:
</td>
<td valign="mid
dl
e">
<input type="text" name="captcha" size="11" maxlength="4" title="輸入右邊的驗(yàn)證碼" />
<span id="span"></span>
<script>
var span = document.getElementById("span");
span.innerHTML=Math.floor(Math.random());
</script>
</td>
</tr>
<tr height="60px">
<td align="center" colspan="2">
<input type="button" value="轉(zhuǎn)到登錄"
onclick
="window.location.replace('login.html')" id="btn1"
onmousemove
="changeBgColor('btn1')"
onmouseout
="recoverBgColor('btn1')" class="submit" /> <input type="submit" accesskey="enter" value="注冊(cè)" id="btn" onmousemove="changeBgColor('btn')" onmouseout="recoverBgColor('btn');" class="submit" formmethod="post"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</p>
</body>
</html>代碼如下:
body
{
background-image: url("../images/bg.jpg");
text-align: center;
background-repeat: repeat-x;
background-position: 0px 0px ;
background-size: }
.table {
border: 1px solid #90BFFF; width:810px;
}
tr
{
font-family: 微軟雅黑;
font-weight:800;
color: #448EF3;
}
input{
border: 1px solid #448EF3;
color: #448EF3;
font-weight:bold;
font-family: "微軟雅黑";
height: 35px;
line-height: 30px;
border-radius:5px;
}
.submit
{ width: 150px; height: 40px;
cursor :hand;
font-size: 20px;
color: #ffffff;
background-color: #448EF3;
border: 0px; }
.thead {
height: 40px;
background : #90BFFF;
font-family: "微軟雅黑";
font-size: 30px;
font-weight: 700;
color: #ffffff;
background: #90BFFF; }
#3{ margin-bottom: 100px; }代碼如下:
function ChkAllClick(sonName, cbAllId){
var arrSon = document.getElementsByName(sonName);
var cbAll = document.getElementById(cbAllId);
var tempState=cbAll.checked; for(i=0;i<arrSon.length;i++) {
if(arrSon[i].checked!=tempState) arrSon[i].click();
} }
function ChkSonClick(sonName, cbAllId)
{ var arrSon = document.getElementsByName(sonName);
var cbAll = document.getElementById(cbAllId);
for(var i=0; i<arrSon.length; i++) {
if(!arrSon[i].checked) {
cbAll.checked = false; return;
} }
cbAll.checked = true;
}
function ChkOppClick(sonName){
var arrSon = document.getElementsByName(sonName);
for(i=0;i<arrSon.length;i++) { arrSon[i].click(); } }
function changeBgColor(btn){
var btn = document.getElementById(btn);
btn.style.backgroundColor = "#90BFFF" }
function recoverBgColor(btn){
var btn = document.getElementById(btn);
btn.style.backgroundColor = "#448EF3" }------------------------------------------------
上面文件的順序是:register.html register.css checkbox..js
-------------------------------------------------
關(guān)于“H5如何制作一個(gè)注冊(cè)頁面”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
文章題目:H5如何制作一個(gè)注冊(cè)頁面-創(chuàng)新互聯(lián)
文章分享:http://chinadenli.net/article24/dpggce.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)、關(guān)鍵詞優(yōu)化、Google、網(wǎng)站營銷、全網(wǎng)營銷推廣、網(wǎng)頁設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容