登录注册html源代码 csdn
时间: 2023-05-08 21:01:03 浏览: 103
登录注册HTML源代码有很多种实现方法,这里提供一种常见的样例代码。
登录部分HTML源代码:
```
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="utf-8">
</head>
<body>
<h1>欢迎登录</h1>
<form action="login.php" method="post">
<label for="username">用户名:</label>
<input type="text" name="username" id="username"><br>
<label for="password">密码:</label>
<input type="password" name="password" id="password"><br>
<input type="submit" value="登录">
</form>
</body>
</html>
```
注册部分HTML源代码:
```
<!DOCTYPE html>
<html>
<head>
<title>注册</title>
<meta charset="utf-8">
</head>
<body>
<h1>欢迎注册</h1>
<form action="register.php" method="post">
<label for="username">用户名:</label>
<input type="text" name="username" id="username"><br>
<label for="password">密码:</label>
<input type="password" name="password" id="password"><br>
<label for="confirm_password">确认密码:</label>
<input type="password" name="confirm_password" id="confirm_password"><br>
<input type="submit" value="注册">
</form>
</body>
</html>
```
以上是一个简单的登录注册页面的HTML源代码,可以根据需要进行相应的修改和完善,加入必要的样式和JavaScript等。