建立一个html页面,添加表单元素,引入Bootstrap,
时间: 2024-05-25 18:18:55 浏览: 130
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap表单示例</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>表单示例</h2>
<form>
<div class="form-group">
<label for="name">姓名:</label>
<input type="text" class="form-control" id="name" placeholder="请输入姓名" name="name">
</div>
<div class="form-group">
<label for="email">电子邮件:</label>
<input type="email" class="form-control" id="email" placeholder="请输入电子邮件" name="email">
</div>
<div class="form-group">
<label for="pwd">密码:</label>
<input type="password" class="form-control" id="pwd" placeholder="请输入密码" name="pwd">
</div>
<div class="form-group form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="remember"> 记住我
</label>
</div>
<button type="submit" class="btn btn-primary">提交</button>
</form>
</div>
</body>
</html>
阅读全文