码迷,mamicode.com
首页 > Web开发 > 详细

js调用RadioButton1

时间:2016-03-18 00:03:03      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function ischeck() {
var txt1=document.getElementById("TextBox1");
var txt2=document.getElementById("TextBox2");
var rdb1=document.getElementById("RadioButton1");
var rdb2=document.getElementById("RadioButton2");
if (rdb1.checked) {
alert("RadioButton1");
txt1.value = "";
txt2.value = "";
}
if (rdb2.checked) {
alert("RadioButton2");
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButton ID="RadioButton1" runat="server" onclick="ischeck()" GroupName="aa"/>
<asp:RadioButton ID="RadioButton2" runat="server" onclick="ischeck()" GroupName="aa"/>
<asp:TextBox ID="TextBox1" runat="server" Text="aa" ></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" Text="bb"></asp:TextBox>
</div>
</form>
</body>
</html>

js调用RadioButton1

标签:

原文地址:http://www.cnblogs.com/kaiwanlin/p/5289856.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!