完成登入與註冊頁面的前端

2022-05-17 23:16:31 字數 4540 閱讀 1109

完成登入與註冊頁面的html+css+js,其中的輸入項檢查包括:

使用者名稱6-12位

首字母不能是數字

只能包含字母和數字

密碼6-12位

註冊頁兩次密碼是否一致

登陸

doctype html

>

<

html

lang

="en"

>

<

head

>

<

meta

charset

="utf-8"

>

<

title

>title

title

>

<

link

rel="stylesheet"

type

="text/css"

href

="../static/css/aa.css"

>

<

script

src="../static/js/aa.js"

>

script

>

head

>

<

body

>

<

div

class

="outbox"

>

<

div

class

="box"

>

<

h2>歡迎來到,**改變世界!

h2>

<

h3>登入頁面

h3>

<

div

class

="input_box"

>

賬號:<

input

id="umane"

type

="text"

placeholder

="請輸入賬號"

>

div>

<

div

class

="input_box"

>

密碼:<

input

id="upass"

type

="password"

placeholder

="請輸入密碼"

>

div>

<

div

id="error_box"

><

br>

div>

<

div

class

="input_box"

>

<

button

onclick

="mylogin()"

>登入

button

>

<

button

onclick

=window.alert("請重新輸入")

>取消

button

>

div>

div>

div>

body

>

html

>

function

mylogin()

else

if((ouname.value.charcodeat(0)>=48) && ouname.value.charcodeat(0)<=57)

else

for(var i=0; i)

}if(upass.value.length>12 || upass.value.length<6)

window.alert("已成功登陸")

註冊

doctype html

>

<

html

lang

="en"

>

<

head

>

<

meta

charset

="utf-8"

>

<

title

>title

title

>

<

link

rel="stylesheet"

type

="text/css"

href

="aa.css"

>

<

script

src="aa.js"

>

script

>

head

>

<

body

>

<

div

class

="outbox"

>

<

div

class

="box"

>

<

h2>歡迎來到,**改變世界!

h2>

<

h3>使用者註冊

h3>

<

div

class

="input_box"

>

輸入賬號:

<

input

id="umane"

type

="text"

placeholder

="請輸入使用者名稱"

>

div>

<

div

class

="input_box"

>

輸入密碼:

<

input

id="upass"

type

="password"

placeholder

="請輸入密碼"

>

div>

<

div

class

="input_box"

>

確認密碼:

<

input

id="userpass1"

type

="password"

placeholder

="請再次輸入密碼"

>

div>

<

div

id="error_box"

><

br>

div>

<

div

class

="input_box"

>

<

button

onclick

="mylogin()"

>註冊

button

>

<

button

onclick

=window.alert("取消註冊")

type

="submit"

class

="btn btn-primary btn-block btn-large"

>返回

button

>

div>

div>

div>

body

>

html

>

function

mylogin()

else

if((ouname.value.charcodeat(0)>=48) && ouname.value.charcodeat(0)<=57)

else

for(var i=0; i)

}if(upass.value.length>12 || upass.value.length<6)

if(oupass.value !=oupass1.value)

window.alert("已成功註冊")

完成登入與註冊頁面的前端

完成登入與註冊頁面的html css js,其中的輸入項檢查包括 使用者名稱6 12位 首字母不能是數字 只能包含字母和數字 密碼6 12位 註冊頁兩次密碼是否一致 賬號 密碼 登入取消 h3 outbox input box error box body function mylogin else...

完成登入與註冊頁面的前端

完成登入與註冊頁面的html css js,其中的輸入項檢查包括 使用者名稱6 12位 首字母不能是數字 只能包含字母和數字 密碼6 12位 註冊頁兩次密碼是否一致 登入 html 1 doctype html 2 html lang en 3 head 4 meta charset utf 8 5...

完成登入與註冊頁面的前端

完成登入與註冊頁面的html css js,其中的輸入項檢查包括 使用者名稱6 12位 首字母不能是數字 只能包含字母和數字 密碼6 12位 註冊頁兩次密碼是否一致 en demo www class box header style background color aquamarine cont...