zoukankan      html  css  js  c++  java
  • js调用RadioButton1

    <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>

  • 相关阅读:
    moment.js相关知识总结
    git相关使用解释
    .我的第一篇博客
    QT项目配置
    重载->
    内核对象同步
    模式对话框与非模式对话框
    显示与隐式类型转换
    size_t与size_type
    系统级源代码:系统裁剪
  • 原文地址:https://www.cnblogs.com/kaiwanlin/p/5289856.html
Copyright © 2011-2022 走看看