表格表单的制作.doc
文本预览下载声明
表格、表单的制作
1、表格制作时网页中常见的一个情况。比如:产品
最终效果:
在html里,代码是这样的:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN /TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=/1999/xhtml
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
title表格布局/title
style type=text/css
table{border-spacing:inherit;margin:0 auto;text-align:center;}
thead{font-size:16px;font-weight:bold;}
/style
/head
body
table width=550 border=1 height=150
thead
td#/td
tdFirst Name/td
tdLast Name/td
tdUsername/td
/thead
tr
td1/td
tdMark/td
tdOtto/td
td@mdo/td
/tr
tr
td2/td
tdJacob/td
tdThomton/td
td@fat/td
/tr
tr
td3/td
tdLarry/td
tdthe Bird/td
tdtwitter/td
/tr
/table
/body
/html
2、表单的制作
表单在网页中的登录和注册这块用的非常多。注册效果如下:
HTML代码:
!doctype html
html
head
meta charset=utf-8
titlelogin登录页面/title
link href=css/login.css rel=stylesheet type=text/css /
/head
body
div class=top_div/div
div class=logina
div class=toubu
div class=tou/div
div class=initial_left_hand id=left_hand/div
div class=initial_right_hand id=right_hand/div
/div
P class=yonghu
label style=float:left; padding-left:10px手机:/label
input class=ipt type=text placeholder=请输入您的手机,只能是数字 id=u_sj runat=server onkeyup=value=value.replace(/[^\w\.\/]/ig,)
/P
P class=shurumm1
label style=float:left; padding-left:10pxQnbsp;nbsp;Q:/label
input class=ipt type=text placeholder=QQ id=u_qq runat=server onchange=if(/\D/.test(this.value)){alert(qq号码只能输入数字);this.value=;}
/P
P class=shurumm1
label style=float:left; padding-left:10px邮箱:/label
input class=ipt type=text placeholder=请输入邮箱(可以是QQ,163) id=u_em runat=server
/P
P class=shurumm1
label style=float:left; padding-left:10px姓名:/label
input class=ipt type=text placeholder=姓名 id=u_name runat=server
/P
div
P class=loginabc
span class=dlua class=denglu href=bbs_reg.html注册/a/span
/P
/div
/div
/body
/html
三佳专注--网页设计培训、平面设计培训
显示全部