单选/多选框
Posted l-mz
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了单选/多选框相关的知识,希望对你有一定的参考价值。
</head>
<body>
<form method="get" action="">
<p>最喜欢的水果:</p>
1.苹果<input type="radio" name="f" value="苹果" checked="checked">
2.橘子<input type="radio" name="f" value="橘子">
3.芒果<input type="radio" name="f" value="芒果"><br>
<br>
<br>
<br>
<p>我喜欢的水果有</p>
1.苹果<input type="checkbox" name="d" value="苹果">
2.橘子<input type="checkbox" name="d" value="橘子">
3.芒果<input type="checkbox" name="d" value="芒果"><br>
<br>
<br>
<br>
<form action="" method="get" class="form-example">
<div class="form-example">
<label for="name">Enter your name: </label>
<input type="text" name="name" id="name" required>
</div>
<div class="form-example">
<label for="email">Enter your email: </label>
<input type="email" name="email" id="email" required>
</div>
<div class="form-example">
<input type="submit" value="Subscribe!">
</div>
</form>
<body>
<form method="get" action="">
<p>最喜欢的水果:</p>
1.苹果<input type="radio" name="f" value="苹果" checked="checked">
2.橘子<input type="radio" name="f" value="橘子">
3.芒果<input type="radio" name="f" value="芒果"><br>
<br>
<br>
<br>
<p>我喜欢的水果有</p>
1.苹果<input type="checkbox" name="d" value="苹果">
2.橘子<input type="checkbox" name="d" value="橘子">
3.芒果<input type="checkbox" name="d" value="芒果"><br>
<br>
<br>
<br>
<form action="" method="get" class="form-example">
<div class="form-example">
<label for="name">Enter your name: </label>
<input type="text" name="name" id="name" required>
</div>
<div class="form-example">
<label for="email">Enter your email: </label>
<input type="email" name="email" id="email" required>
</div>
<div class="form-example">
<input type="submit" value="Subscribe!">
</div>
</form>
</form>
</body>
</html>
</body>
</html>
以上是关于单选/多选框的主要内容,如果未能解决你的问题,请参考以下文章
Layuilayui 单选框多选框radio 元素判断是必填项 lay-verify=‘required‘
Layuilayui 单选框多选框radio 元素判断是必填项 lay-verify=‘required‘
Layuilayui 单选框多选框radio 元素判断是必填项 lay-verify=‘required‘
Selenium—选择框的相关操作(单选框多选框复选框下拉框)