日期:2014-05-18 浏览次数:20476 次
<script type="text/javascript"> function test() { var tempInputArray = document.getElementsByTagName("input"); for(var i = 0; i < tempInputArray.length; i++) { var tempRadio= tempInputArray[i]; if(tempRadio.type == "radio" && tempRadio.name == "TP2" && tempRadio.checked) { alert(tempCheckBox.value); } } } </script>
------解决方案--------------------
<script type="text/javascript"> function test() { var tempInputArray = document.getElementsByTagName("input"); for(var i = 0; i < tempInputArray.length; i++) { var tempRadio= tempInputArray[i]; if(tempRadio.type == "radio" && tempRadio.name == "TP2" && tempRadio.checked) { alert(tempRadio.value); } } } </script>
------解决方案--------------------
靠,你到底是取值还是绑定值啊?问都问不明白
------解决方案--------------------
用hiddenfield
孟子网站上有http://dotnet.aspx.cc/article/f43af9a5-2c2e-4aa6-e976-21e9569f5a8a/read.aspx
------解决方案--------------------
RadioButtonList RadioButtonList1=(RadioButtonList)datalist.FindControl("RadioButtonList_id");
然后再在RadioButtonList1里面取值就可以了;
------解决方案--------------------
RadioButtonList RadioButtonList1=(RadioButtonList)datalist.FindControl("RadioButtonList_id");
然后到RadioButtonList1里面取值就可以了
------解决方案--------------------
在DataBound事件里绑定RadioButtonList1
取值
RadioButtonList RadioButtonList1=(RadioButtonList)datalist.FindControl( "RadioButtonList_id ");