Bootstrap框架--1.6模态框

用法

1.通过data属性:在控制器元素(比如按钮或者链接)上设置属性data-toggle="modal",同时设置data-target="#identifier"来指定要切换的特定的模态框(带有id="identifier")。

2.通过JavaScript:使用这种技术,可以通过JavaScript来调用带有id="identifier"的模态框:

$('identifier').modal(options);
$('identifier').modal('show');//打开模态框
$('identifier').modal('hide');//关闭模态框

参考:Bootstrap 模态框 | 菜鸟教程

猜你喜欢

转载自blog.csdn.net/weixin_46479909/article/details/131595296