案例說明:
- 使用表格實現頁面效果
- 超連結不想要有效果,使用href="#"
- 如果表格裡面的單元格沒有內容,使用空格作為佔位符
- 使用圖片標籤提交表單 <input type="image" src="圖片的路徑"/>
完整程式碼:
<
html
>
<
head
>
<
title
>World</
title
>
</
head
>
<
body
>
<
form
action
=
"01-hello.html"
method
=
"post"
>
<
h3
align
=
"center"
>歡迎登入此頁面!</
h3
>
<
table
width
=
"100%"
>
<
tr
>
<
td
align
=
"right"
>註冊郵箱:</
td
>
<
td
><
input
type
=
"text"
name
=
"regit"
/></
td
>
</
tr
>
<
tr
>
<
td
> </
td
>
<
td
>您還可以使用<
a
href
=
"#"
>手機號</
a
>註冊或者使用<
a
href
=
"#"
>賬號</
a
>註冊</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>建立密碼:</
td
>
<
td
><
input
type
=
"password"
name
=
"pwd"
/></
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>真實姓名:</
td
>
<
td
><
input
type
=
"text"
name
=
"realname"
/></
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>性別:</
td
>
<
td
>
<
input
type
=
"radio"
name
=
"sex"
value
=
"famale"
/>女
<
input
type
=
"radio"
name
=
"sex"
value
=
"male"
/>男
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>生日:</
td
>
<
td
>
<
select
name"year">
<
option
value
=
"1997"
/>1997
<
option
value
=
"1998"
/>1998
<
option
value
=
"1999"
/>1999
</
select
>年
<
select
name"month">
<
option
value
=
"01"
/>01
<
option
value
=
"02"
/>02
<
option
value
=
"03"
selected
=
"selected"
/>03
</
select
>月
<
select
name"day">
<
option
value
=
"20"
/>20
<
option
value
=
"21"
/>21
<
option
value
=
"22"
/>22
</
select
>日
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>我現在:</
td
>
<
td
>
<
select
name"now">
<
option
value
=
"study"
/>正在上學
<
option
value
=
"1998"
/>已經工作
</
select
>
</
td
>
</
tr
>
<
tr
>
<
td
> </
td
>
<
td
><
img
src
=
"images/verycode.png"
/><
a
href
=
"#"
>看不清換一張?</
a
></
td
>
</
tr
>
<
tr
>
<
td
> </
td
>
<
td
><
input
type
=
"image"
src
=
"images/btn.png"
></
td
>
</
tr
>
</
table
>
</
form
>
</
body
>
</
html
>
總結
以上所述是小編給大家介紹的HTML 使用表單標籤實現註冊頁面的例項程式碼,希望對大家有所幫助。