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>

  • 相关阅读:
    js_未结束的字符串常量
    [转]关于项目管理的思考
    Nhibernate理解
    Visual Studio 2005常用插件搜罗
    基本概念
    resharper 2.0
    Nhibernate资源
    [转]关于项目管理的知识点
    style
    带分数 蓝桥杯
  • 原文地址:https://www.cnblogs.com/kaiwanlin/p/5289856.html
Copyright © 2011-2022 走看看