转自:http://www.jbxue.com/article/js/20653.html
发布时间:2014-05-11 编辑:kksky
例子,js取radio
<form method="post" name="form1">
<label><input type="radio" name="radio" value="1-10 岁">1-10 岁</label>
<label><input type="radio" name="radio" value="11 岁">11 岁</label>
<label><input type="radio" name="radio" value="12-120 岁">12-120 岁</label>
<input type="button" onclick="ok()" value="测试选择值">
</form>
<form method="post" name="form2">
<input type="text" name="textfield">
</form>
<script language="javascript" type="text/javascript">
<!--
function ok()
{ www.jbxue.com
var temp=document.getElementsByName("radio");
for (i=0;i<temp.length;i++){
//遍历Radio
if(temp[i].checked)
{alert("你选择了"+temp[i].value);
//获取Radio的值
document.form2.textfield.value="你选择了"+temp[i].value;
//传递给另外一个表单
}
}
}
-->
</script>
相关推荐
jquery取radio单选按钮的值[文].pdf
Flutter Radio 单选按钮
炫酷能量球radio单选按钮.zip
又一款漂亮的带动画效果的CSS3 checkbox复选框、radio单选按钮特效,鼠标点击那些按钮时,会有动画效果,而且一改默认单选框和复选框的呆板样式,将里面的对勾和小点换成了其它的自定义图案,比原来的漂亮多了。
many2many_radio单选按钮
js 单选 radio切换div
js控制单选按钮(radio)的取消与选中,javascript单选按钮
一个简单的单选按钮控件演示程序,演示单选按钮控件是如何使用的
原理就是:一般使用遍历的方法,判断每个Radio是否被选中,如果是,再取其值. <form id=userlist method=post action=option.php> <input type=radio name=userid value=1>1 <input type=radio name=...
$(function(){ $("input:radio").click(function () { //获取选中的radio的值 if($(this).attr("checked")){ var contactUserId = $(this).val(); alert(contactUserId ); } }); }); </script>
Css3创意单选按钮radio动画代码.rar
基于bootstrap的单选按钮图标 改变了浏览器自带形状,支持自定义图标
在ASP.NET中使用单选按钮控件.rar在ASP.NET中使用单选按钮控件.rar
1、使用v-for循环的radio单选框 01)需要注意的是,这是使用的是 change 事件,而不是 click 点击事件 (item, key=index> <input type=radio v-model=radioVal :value=item.value @change=getRadioVal
3.3 使用单选钮(Radio) 和多选钮(Checkbox) 的例子 . . . . . . . . . . . . . . 18 3.4 JavaScript 中的字符串和日期对象. . . . . . . . . . . 21 3.4.1 字符串对象. . . . . . . . . . . . . . . . . 21 3.4.2 ...
jQuery实现一个自定义的单选按钮radio
本文给大家分享两段实例代码给大家讲解jquery获取选中单选按钮radio的值,非常不错,具有参考借鉴价值,一起看看吧
在asp.net中RadioButtonList 单选按钮组选中的值传入后台,并把所有选中的值相加,然后一起将数据写入数据库中
vs2010,参考 http://blog.csdn.net/infoworld/article/details/39451125,改进例子,实现 复选框和单选框的透明背景,其他其他控件也可以用.