在Asp.net上显示Bootstrap Modal弹出窗口单选按钮列表项单击

时间:2019-04-30 06:33:48

标签: asp.net radio-button bootstrap-modal

我试图在单选按钮列表上显示一个模式弹出窗口,单击我的asp.net应用程序中的每个项目。下面是我正在尝试的我的代码,但是它不起作用。

<script type="text/javascript">

    $('input[type=radio]:checked').change(function () {

            $('#myModal').modal('show');
     });

</script>

 <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" GROUP = "Blocks" RepeatColumns="10" Name="bn">
        <asp:ListItem>R10S1</asp:ListItem>
        <asp:ListItem>R10S2</asp:ListItem>
        <asp:ListItem>R10S3</asp:ListItem>
   </asp:RadioButtonList>

    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Incorrect Certificate Information</h4>
          </div>
          <div class="modal-body" style="text-align:center;">
            <p>Please contact Nathan Finch at PPE</p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          </div>
        </div>
      </div>
    </div>

任何帮助如何实现

0 个答案:

没有答案