Web前端第一次作业
作业代码:
(1)登录页面:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
</head>
<body>
<h3>会员登录页面</h3>
<hr>
<form action="index.html" method="get">
<table width="500" border="0" cellpadding="10" align="center">
<tr align="center">
<td>YQ会员登录</td>
</tr>
<tr>
<td align="right"><label for="zhanghao">账号:</label></td>
<td><input type="text" id="zhanghao" placeholder="请输入账号"></td>
</tr>
<tr>
<td align="right"><label for="mima">密码:</label></td>
<td><input type="password" id="mima" placeholder="请输入密码"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="reset" value="清空">
<input type="submit" value="登录">
</td>
</tr>
</table>
</form>
</body>
</html>
```
(2)注册页面:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="index.html" method="get">
<table width="500" border="0" cellpadding="10" align="center">
<tr align="center">
<td>YQ会员注册</td>
</tr>
<tr>
<td align="right"><label for="zhanghao">账号:</label></td>
<td><input type="text" id="zhanghao" placeholder="请输入账号"></td>
</tr>
<tr>
<td align="right"><label for="mima">密码:</label></td>
<td><input type="password" id="mima" placeholder="请输入密码"></td>
</tr>
<tr>
<td align="right"><label for="mima">确认密码:</label></td>
<td><input type="password" id="mima" placeholder="请再次输入密码"></td>
</tr>
<tr>
<td align="right"><label for="nicheng">昵称:</label></td>
<td><input type="text" id="nicheng" placeholder="请输入昵称"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="注册">
</td>
</tr>
</table>
</form>
</body>
</html>
```
(3)主页页面跳转:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>index</title>
</head>
<body>
<h3>主页</h3>
<hr>
<ul>
<li><a href="./登录.html" target="_blank">登录页面</a></li>
<li><a href="./注册.html" target="_blank">注册页面</a></li>
</ul>
</body>
</html>
```
效果展示:
总结:主页点击**登录**或者**注册**能直接跳转到新页面,登录页面,输入账号密码,就可以跳转到对应主页,注册页面也是如此,该次作业运用了表格标签修饰页面,用表单标签做出要求,最后运用超链接实现页面跳转
原文地址:https://blog.csdn.net/unfeeling_/article/details/145165127
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!