加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – Bootstrap模态未捕获的TypeError:对象[ob

发布时间:2020-12-17 20:37:40 所属栏目:安全 来源:网络整理
导读:尝试使用bootstrap我收到了标题中写的错误 我的代码 function closeDialog () { $('#windowTitleDialog').modal('hide'); }; 这些是包含的文件 link href="http://static.scripting.com/github/bootstrap2/css/bootstrap.css" rel="stylesheet" script src="
尝试使用bootstrap我收到了标题中写的错误

我的代码

function closeDialog () {
    $('#windowTitleDialog').modal('hide'); 
};

这些是包含的文件

<link href="http://static.scripting.com/github/bootstrap2/css/bootstrap.css" rel="stylesheet">
  <script src="http://static.scripting.com/github/bootstrap2/js/jquery.js"></script><style type="text/css"></style>
  <script src="{{=URL(request.application,'static','js/bootstrap-transition.js')}}"></script>
  <script src="http://static.scripting.com/github/bootstrap2/js/bootstrap.js"></script>
  <script type="text/javascript"src="{{=URL(request.application,'js/modal.js')}}"></script>

有什么建议??

解决方法

我有这个确切的问题.
毕竟解决方案非常简单:

原来,我已经两次包含jQuery了.

删除多余的jQuery后,模态开始按预期工作.所以

$('#theModal').modal('hide')

实际上关闭了对话框.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读