RadioButonList 的一个问题。请高手指教 radio里面加个onclick="aa(this.value);"然后jsfunction aa(value){你的处理} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>无标题页</title></head><body> <form id="form1" runat="server"> <div> <asp:RadioButtonList ID="r1" runat="server" onclick="a()"> <asp:ListItem Text="1" Value="a"></asp:ListItem> <asp:ListItem Text="2" Value="b"></asp:ListItem> <asp:ListItem Text="3" Value="c"></asp:ListItem> </asp:RadioButtonList><br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /> </div> </form></body></html><script>function a(){ obj = document.getElementsByName("r1"); for(var i=1;i<obj.length;i++) { if(obj[i].checked) document.getElementById("TextBox1").value = obj[i].value; }}</script> 此回复为自动发出,仅用于显示而已,并无任何其他特殊作用楼主【didiaogao】截止到2008-06-26 17:19:21的历史汇总数据(不包括此帖):发帖数:4 发帖分:60 结贴数:4 结贴分:60 未结数:0 未结分:0 结贴率:100.00% 结分率:100.00% 敬礼! 如果radioButtonList要调用客户端的js代码 是不是该用onclientclick事件 不用,就onclick,JS本来就是客户端语言 记得前段时间我看见过jQuery1.4支持iframe跨域访问来设置高度的,但是找不到了 HTML5游戏:撕掉MM的衣服 JS面向对象语法问题 奇怪的问题 D-tree简单应用出错 求一个关于汉字得javascript,急等! 这样的滚动条效果怎么实现? 传多个值问题 现在VBSCRIPT的程序员提供了这样一段脚本。但是没见有JS的版本,很是郁闷。是不是没有人做过。100分献给做出来的高手. <在线等待>怎样关闭页面? JS 的问题 高手们帮忙... 如何动态拆分表格。谢谢
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="r1" runat="server" onclick="a()">
<asp:ListItem Text="1" Value="a"></asp:ListItem>
<asp:ListItem Text="2" Value="b"></asp:ListItem>
<asp:ListItem Text="3" Value="c"></asp:ListItem>
</asp:RadioButtonList><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
</div>
</form>
</body>
</html>
<script>
function a()
{
obj = document.getElementsByName("r1");
for(var i=1;i<obj.length;i++)
{
if(obj[i].checked)
document.getElementById("TextBox1").value = obj[i].value;
}
}
</script>
楼主【didiaogao】截止到2008-06-26 17:19:21的历史汇总数据(不包括此帖):
发帖数:4 发帖分:60
结贴数:4 结贴分:60
未结数:0 未结分:0
结贴率:100.00% 结分率:100.00%
敬礼!