简体   繁体   English

单击模式按钮不会执行任何操作

[英]Button for modal does nothing when clicked

I created a button that references a modal but it doesn't open the modal at all. 我创建了一个引用模式的按钮,但它根本没有打开模式。 This area of code isn't my realm, SQL is. 这不是我的领域,SQL是我的领域。 This code actually lives in an SQL procedure that is called when interacting with a website. 该代码实际上存在于与网站交互时调用的SQL过程中。

Thoughts? 有什么想法吗?

--Remove package item, Modal Popup
    <div id="delete_btn_modal" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <div class=modal-body>
                <h3><font color="red" align="center">Are you sure?</h3></font></br>
                <p>Deleting a package item will remove the entire package</br></br>
                    <button type="button" class="btnStyle" data-dismiss="modal">Close</button> 
                    <button type="button" class="btnStyle" onclick=location.href="http://wowfestival.lajollaplayhouse.org/cart/precart.aspx?p=499">Delete Package</button>
                </p>
            </div>
        </div>
    </div>

--button
        <button type="button" class="btnStyle" data-toggle="modal" data-target="#delete_btn_modal">Delete</button>

Seems you have not added bootstrap javascript 似乎您尚未添加引导JavaScript

Your code is perfect and fine 您的代码完美无缺

Check the bootply for your code. 检查启动程序中的代码。 : http://www.bootply.com/zOa8UJ4Vfb http//www.bootply.com/zOa8UJ4Vfb

Also check you you have jQuery included as well . 还要检查您是否也包含jQuery。

If not use below cdn for quick test. 如果不使用,请在CDN以下进行快速测试。

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
  <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM