网站建设HTML学习教程:[3]radio标签元素
1、<radio>元素使用的语法:<input name="Fruit" type="radio" value="" />
使用HTML的input标签,name为自定义,type类型为“radio”的表单。
![网站建设HTML学习教程:[3]radio标签元素](https://exp-picture.cdn.bcebos.com/125ed0ecd3d969752d62422ad243040149fe093e.jpg)
2、案例演示效果。
![网站建设HTML学习教程:[3]radio标签元素](https://exp-picture.cdn.bcebos.com/edd84743040148fefae4f3d88fd149299b88023e.jpg)
![网站建设HTML学习教程:[3]radio标签元素](https://exp-picture.cdn.bcebos.com/1f03436b04d14929722e97a063e5eceeacbc7e3e.jpg)
3、案例代码分析。
源代码(
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>皇皇皇太子</title>
</head>
<body>
<form action="" method="get">
你最喜欢那个网站?<br /><br />
<label><input name="Fruit" type="radio" value="" />百度 </label>
<label><input name="Fruit" type="radio" value="" />网易 </label>
<label><input name="Fruit" type="radio" value="" />新浪 </label>
<label><input name="Fruit" type="radio" value="" />搜狐 </label>
<label><input name="Fruit" type="radio" value="" />其它 </label>
</form>
</body>
</html>
)
![网站建设HTML学习教程:[3]radio标签元素](https://exp-picture.cdn.bcebos.com/9bc92713e8e5ecee411a109ccc704618deda7a3e.jpg)