WEB前端技术开发--登录表与注册表

一、实验目的

掌握表单元素做一个注册页面和登录页面

二、实验内容

1.实验区域

2.功能描述

在这个实验中,可以进行注册,当你注册成功后,会弹出警示框,告诉你注册成功,如果你已经有账号了,直接选择登陆界面,输入正确的形式,就可以弹出来登陆成功。

3.html描述

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>个人注册和登录界面</title>
		<link type="text/css" rel="stylesheet" href="css/zhuce.css" />
	</head>
	<body>
		<div class="main">
			<form>
				<fieldset>
					<legend align="center">注册表</legend>
					<h3 align="center">如果你还没有注册账号   赶紧注册吧!</h3>
					<div align="center">
						手&nbsp;&nbsp;机&nbsp;号:<input type="text" id="phone"/>
						<br />
						用&nbsp;&nbsp;户&nbsp;名:<input type="text" id="username" name="username" value="请输入喜欢的用户名"/>
						<br />
						身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份:<select name="card"/>
						<option value="学生">学生</option>
						<option>家长</option>
						<option>老师</option>
						</select>
						<br />
						性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:<input type="radio" name="sex" checked="checked" value="male"/>男<input type="radio" name="sex" value="female" />女
						<br />
						密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" id="pasw" />
						<br />
						确认密码:<input type="password" id="pasw" />
						<br />
						验&nbsp;&nbsp;证&nbsp;码:<input type="text" id="yanzheng"/>
						<br />
						<input type="button" id="button" name="button" value="注册" onclick="javascript:alert('注册成功!')" />
					</div>
				</fieldset>
				<fieldset>
					<legend align="center">登录表</legend>
					<h4 align="center">如果你已注册,请登录!</h4>
					<div align="center">
						手&nbsp;&nbsp;机&nbsp;号:<input type="text" id="phone"/>
						<br />
						密&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" id="pasw"/>
						<br />
						<input type="button" id="button" value="登录" onclick="javascript:alert('登录成功!')"/>
					</div>
				</fieldset>
			</form>
		</div>
	</body>
</html>

4.css描述

    legend{
	font-size: 35px;
	color: deepskyblue;  
}
#phone{
	border-radius: 5px;
	text-align: center;
}
#pasw{
	border-radius: 5px;
	text-align: center;
}
#username{
	border-radius: 5px;
	text-align: center;
}
#yanzheng{
	border-radius: 5px;
	text-align: center;
}
h4{
	color: red;
}
.main{
	width: 350px;
}
div{
	background-color: azure;
}
#button{
	margin-top: 20px;
	background-color: bisque;
	color: red;
	width: 118x;
	height: 68px;
	font-size: 48px;
	border-radius: 10px;
	border-style: none;
}
 

三、实验总结

1.实验过程中遇到的问题及解决办法

遇到的问题

1)在选择性别按钮的时候,可以同时选择男和女;

2)分组lengend的时候,里面的文字无法正确居中;

解决的办法

1)给一个其中一个为选中按钮,并且给value值,可以解决;

2)在后面直接使用align=”center”;

2.本次实验过程总结

     在此次实验中,学会了用文本框输入内容,学会了设置边框为不显示,这样可以达到美观的效果,设置边框四角弧度可以使整个界面看起来很好看,当你点注册的时候,会弹出注册成功的警示,当你在登录表中,点登录的时候,会提示你登录成功,在这次实验中,把以前觉得有意思的选中,下来列表都实现了。

  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值