第三章 课后练习 2.0

 1.采用表格布局完成“CASIO计算器”外观设计,其中表格的每一个单元格均需要设计带边框。

代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<table  border="2" bordercolorlight="#220000" bordercolordark="#000000" width="490px" height="490px" >
			<tr  height="70px">
				<td valign="center">
					<img src="img/5.bmp"  >
				</td>
			</tr >
			<tr bgcolor="aliceblue"  height="140px">
				<td>
				</td>
			</tr>
			<tr align="center" valign="middle">
				<td>
					<table border="2" bordercolor="#000000" height="263px"  width="476px" cellspacing="10px" >
						<tr align="center"  >
							<td width="80px">1</td>
							<td width="80px">2</td>
							<td width="80px">3</td>
							<td width="80px">+</td>
						</tr>
						<tr align="center">
							<td width="80px">4</td>
							<td width="80px">5</td>
							<td width="80px">6</td>
							<td width="80px">-</td>
						</tr>
						<tr align="center">
							<td width="80px">7</td>
							<td width="80px">8</td>
							<td width="80px">9</td>
							<td width="80px">*</td>
						</tr>
						<tr align="center">
							<td width="80px">0</td>
							<td width="80px">=</td>
							<td width="80px">CE</td>
							<td width="80px">/</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>

效果图:

2.采用表单编写程序实现登录页面

代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录页面</title>
		<style>
		        .center-pre {
		            display: flex;
		            justify-content: center;
		            align-items: center;
		    
		        }
		    </style>
	</head>
	<body>
		<fieldset>
			<legend align="center">登录页面</legend>
		
	<div class="center-pre"><pre aligen="center"><form name="dengluyemian" mrthod="post" action="form_action.jsp" enctype="text/plain">
	用户名:<input type="text" name="user"  />
	密  码:<input type="password" name="password"/>
			<form name="leixing" method="post" action="form_action.jsp" enctype="text/plain">
	类 型:<input type="radio" name="类型" value="putong"/ checked>普通用户<input type="radio" name="类型" value="guanliyuan"/>管理员
	<input type="checkbox" name="n1" value="记住密码" /> 记住密码<input type="checkbox" name="n1" value="自动登录" />自动登录
	   <input type="submit" name="button" value="提交"/>  <input type="reset" value="重置"/></pre></div>
			</form>
		</form>
		</fieldset>
	</body>
</html>

效果图:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值