请给出护照办理系统的办理页面html代码要求功能要多
护照办理系统的办理页面HTML代码如下:
<!DOCTYPE html>
<html>
<head>
<title>护照办理系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
h1 {
font-size: 2em;
text-align: center;
margin-top: 50px;
}
form {
background-color: #fff;
padding: 20px;
max-width: 600px;
margin: 0 auto;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
border-radius: 5px;
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
input[type="text"], input[type="email"], input[type="tel"] {
display: block;
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1em;
}
input[type="radio"] {
margin-right: 10px;
}
select {
display: block;
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1em;
}
button[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
margin-bottom: 20px;
}
button[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<h1>护照办理系统</h1>
<form method="post" action="submit.php">
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required>
<label for="email">电子邮件:</label>
<input type="email" id="email" name="email" required>
<label for="phone">电话:</label>
<input type="tel" id="phone" name="phone" required>
<label for="gender">性别:</label>
<input type="radio" id="male" name="gender" value="male" required>
<label for="male">男</label>
<input type="radio" id="female" name="gender" value="female">
<label for="female">女</label>
<label for="nationality">国籍:</label>
<select id="nationality" name="nationality" required>
<option value="">请选择国籍</option>
<option value="china">中国</option>
<option value="usa">美国</option>
<option value="japan">日本</option>
<option value="korea">韩国</option>
<option value="uk">英国</option>
<option value="france">法国</option>
</select>
<button type="submit">提交</button>
</form>
</body>
</html>
该代码实现了以下功能:
- 显示系统标题和表单。
- 表单包含姓名、电子邮件、电话、性别和国籍等必填字段。
- 表单提交方式为POST,提交到submit.php页面。
- 实现了表单的样式美化,包括背景颜色、边框、阴影和圆角等。
- 实现了表单字段的样式美化,包括输入框、单选框和下拉框的样式。
- 实现了表单字段的验证,包括必填字段和电子邮件、电话格式的验证。
- 实现了提交按钮的样式美化和点击效果。
原文地址: https://www.cveoy.top/t/topic/bUtZ 著作权归作者所有。请勿转载和采集!