HTML5第八节 单选按钮 复选按钮和下拉框的讲解

<select>下拉框

<option>是下拉框的选项

<submit>提交按钮

<value>名称提交方式

<checked>单选按钮进入页面必选这个

<checkbox>多选按钮



<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title></title>

</head>

<body>

请选择你喜欢的水果<br />

<form>

<input type="radio" value="apple" name="fruit" checked="checked"/>苹果<br />

<input type="radio" value="orange" name="fruit"/>橘子<br />

<input type="radio" value="mango" name="fruit"/>芒果<br />

<input type="submit" value="提交"/>

</form>

请选择你喜欢的水果<br />

<form>

<input type="checkbox" value="apple" name="fruit"/>苹果<br />

<input type="checkbox" value="orange" name="fruit"/>橘子<br />

<input type="checkbox" value="banana" name="fruit"/>香蕉<br />

<input type="submit" value="提交"/>

</form>

请选择你喜欢的水果<br />

<form>

<select name="fruit" size="2">

<option value="apple">苹果</option>

<option value="orange">橘子</option>

<option value="mango" selected="selected">芒果</option>

</select><br />

<input type="submit" value="提交"/>

</form>

</body>

</html>

举报
评论 0