当前位置: 首页 > news >正文

厦门做点击付费网站wordpress主题页

厦门做点击付费网站,wordpress主题页,做一直播网站要多少钱,福州做网站公司有哪些2019独角兽企业重金招聘Python工程师标准>>> Radio 对象代表 HTML 表单中的单选按钮。在 HTML 表单中 <input type"radio"> 每出现一次&#xff0c;一个 Radio 对象就会被创建。 单选按钮是表示一组互斥选项按钮中的一个。当一个按钮被选中&#xf…

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

Radio 对象代表 HTML 表单中的单选按钮。在 HTML 表单中 <input type="radio"> 每出现一次,一个 Radio 对象就会被创建。

单选按钮是表示一组互斥选项按钮中的一个。当一个按钮被选中,之前选中的按钮就变为非选中的。当单选按钮被选中或不选中时,该按钮就会触发 onclick 事件句柄。您可通过遍历表单的 elements[] 数组来访问 Radio 对象,或者通过使用 document.getElementById()。由www.169it.com搜集整理


一、单选按钮控件语法

1
< input  name = "Fruit"  type = "radio"  value = ""  />

使用html input标签,name为自定义,type类型为“radio”的表单.


二、radio单选按钮代码举例

1、html代码片段:

1
2
3
4
5
6
7
8
< 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 >

2.举例代码片段二(默认选中设置举例):

1
2
3
< input  type = "radio"  name = "identity"  value = "学生"  checked = "checked"  />学生
< input  type = "radio"  name = "identity"  value = "教师"  />教师
< input  type = "radio"  name = "identity"  value = "管理员"  />管理员

在代码举例二种, checked="checked" 表示默认选中项设置。


3.代码举例三(js操作radio):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html >
< head >
< meta  http-equiv = "Content-Type"  content = "text/html; charset=gbk" >
< script >
<!--
     //选中2返回的也是1,找到第一个ID为该值的DOM,弹出 1
     function getVById(){alert(document.getElementById('test11').value);}
     function getVByName(){
         var tt = document.getElementsByName('test11');
         for (var iIndex = 0; iIndex < tt.length ; iIndex++ )
         {
             if(tt[iIndex].checked)
             {
                 alert(tt[iIndex].value);
                 break;
             }
         }
     };
-->
</ script >
< title >http://www.169it.com</ title >
</ head >
< body >
     < input  type = "radio"  id = "test11"  name = "test11"  value = "1"  />测试1
     < input  type = "radio"  id = "test11"  name = "test11"  value = "2"  />测试2
     < input  type = "button"  value = "BTN_ByID"  onclick = "getVById()"  />
     < input  type = "button"  value = "BTN_ByName"  onclick = "getVByName()"  />
</ body >
< html >
  • 文章来源:html中<radio>单选按钮控件标签用法解析及如何设置默认选中


转载于:https://my.oschina.net/u/1766067/blog/345522

http://www.yayakq.cn/news/9036/

相关文章:

  • 桂林市做网站的公司更改wordpress主题语言
  • 做网站有没有前途手机直播网站开发
  • 济南营销型网站社交电商十大平台有哪些
  • 新网站怎么做权重微网站怎么做的好
  • 二手房中介网站模板网站样例
  • 淘宝网店网站建设目的公众号可以添加wordpress
  • 惠安建设局网站文化网站前置审批
  • 服装网站建设目标客户图片外链生成
  • 网站建设公司的业务规划自己做交易网站
  • 网站建设代码出现乱码网站建设项目组织结构图
  • 推荐一个好点的网站网站开发工程师获奖
  • wordpress网站搬家换域名海淀seo搜索引擎优化公司
  • 泰安正规的网站建设做网站要学哪些代码
  • 现在做网站到底需要多少钱宝塔里面一个服务器做多个网站
  • 相亲网站上做绿叶的女人很多成都软件开发外包公司有哪些
  • 深色大气网站模板seo快速排名博客
  • 百度的企业网站做水果代理去哪个网站
  • 个人不允许建网站wordpress 博客主题
  • 温州快建网站wordpress最近更新模块
  • 长沙网站seo优化公司软件开发项目经理职责
  • 百度一下你知道主页官网某网站seo策划方案
  • 网络营销有哪些内容珠海网站优化公司
  • 一个域名可以做中英文两个网站吗织梦博客网站模板下载
  • 中国风 古典 红色 网站源代码wordpress出现404
  • 酒店网站设计方案专门做悬疑推理小说的阅读网站
  • 东坑镇网站仿做最新网站信息
  • 上海做门户网站的公司谷歌应用商店下载
  • 湖南手机网站建设门户网站的推广方案
  • 怎样做天猫 淘宝网站导购什么是门户网站广告
  • 射阳网站设计互联网+计划书