Bootstrap模态-弹出窗口未显示 [英] Bootstrap modal - popup window not showing

查看:63
本文介绍了Bootstrap模态-弹出窗口未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下示例 http://www.bootply.com/59864

I am using following example http://www.bootply.com/59864

但是,当我单击触发弹出按钮时,背景变暗,但窗口不显示.知道是什么原因造成的吗?我正在使用Bootstrap 3.2.0

But when I click on the button which triggers the pop up, background gets darker but window doesn't show. Any idea what's causing this? I am using bootstrap 3.2.0

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CreateWorkbook.aspx.cs" Inherits="CreateWorkbook" %>
<asp:Content ID="Content0" ContentPlaceHolderID="head" runat="Server">
    <script>
        $(function () {
            $('#myFormSubmit').click(function (e) {
                e.preventDefault();
                alert($('#myField').val());
                /*
                $.post('http://path/to/post', 
                $('#myForm').serialize(), 
                function(data, status, xhr){
                // do something here with response;
                });
                */
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

      
            <div class="row">
                <div class="col-md-12 col-xs-12" style="margin-top: 10px">
                    <a data-toggle="modal" href="#myModal" role="button" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-plus-sign">
                    </span>Add questions</a>
                </div>
            </div>
      <div class="list-group col-md-8" style="margin-top:20px"> <a href="#" class="list-group-item active"> Questions list </a> <a href="#" class="list-group-item list-group-item-info">Q1: Name</a> <a href="#" class="list-group-item list-group-item-info">Q2: Location</a> <a href="#" class="list-group-item list-group-item-info">Q3: Outcome</a> <a href="#" class="list-group-item list-group-item-info">Q4: Next meeting date</a> </div>
      <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3 id="myModalLabel">Modal header</h3>
	</div>
	<div class="modal-body">
		<form id="myForm" method="post">
          <input type="hidden" value="hello" id="myField">
    		<button id="myFormSubmit" type="submit">Submit</button>
		</form>
	</div>
	<div class="modal-footer">
		<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
		<button class="btn btn-primary">Save changes</button>
	</div>
</div>
</asp:Content>

推荐答案

工作示例基于Bootstrap 2.3.1,如果要导入Bootstrap 3.3.0,则工作示例可以是:

The working example is based on Bootstrap 2.3.1, if you are importing Bootstrap 3.3.0, then a working example could be: http://bootply.com/va3EnHE0MJ

这篇关于Bootstrap模态-弹出窗口未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆