HTML Radio标签

HTML <Radio>按钮用于定义小圆圈, 选中时会突出显示这些小圆圈。它是一个表单元素, 允许用户从给定的选项集中仅选择一个选项。

它由<input>元素的type属性创建, 如以下语法所示:

<input type="radio" name ="Any_name"/>

html>
<head>
</head>
<title> Example of Radio Button</title>
<body>
<form>
  
<label>
Gender: 
</label>  <br>
<input type="radio" id="gender" name="gender" value="male"/> Male  
<br>
<input type="radio" id="gender" name="gender" value="female"/> Female <br/> 
</form>  
</body>
</html>

立即测试

输出:

html Radio标签

浏览器支持

Element Chrome IE Firefox Opera Safari
<radio> Yes Yes Yes Yes Yes

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_49890.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?