最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - BootstrapDialog.alert() not showing up - Stack Overflow

programmeradmin0浏览0评论

I am using the following code to show a BootstrapDialog and its not showing up Please help

<!DOCTYPE HTML>
<html>
<head>
<title>dialog box example</title>
<link href="//netdna.bootstrapcdn/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
    <input type="button"  value="button1" class="btn btn-info" onclick="showmes();">


        <script src=".7.1/jquery.min.js"></script>
    <script src="//netdna.bootstrapcdn/bootstrap/3.1.1/js/bootstrap.min.js"></script>

    <script>
    function showmes() {
        BootstrapDialog.show(typeof(BootstrapDialog)); //.alert('I want banana!');
    }
    </script>
</body>
</html>

I am using the following code to show a BootstrapDialog and its not showing up Please help

<!DOCTYPE HTML>
<html>
<head>
<title>dialog box example</title>
<link href="//netdna.bootstrapcdn./bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
    <input type="button"  value="button1" class="btn btn-info" onclick="showmes();">


        <script src="https://ajax.googleapis./ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="//netdna.bootstrapcdn./bootstrap/3.1.1/js/bootstrap.min.js"></script>

    <script>
    function showmes() {
        BootstrapDialog.show(typeof(BootstrapDialog)); //.alert('I want banana!');
    }
    </script>
</body>
</html>
Share Improve this question edited Oct 22, 2014 at 15:26 mahemoff 46.6k39 gold badges170 silver badges233 bronze badges asked Apr 16, 2014 at 19:08 ChanduChandu 2,0497 gold badges38 silver badges61 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

BootstrapDialog is not part of the bootstrap library, it is a part from an external javascript library built on top of bootstrap.

Therefore, you must include the bootstrap-dialog.js and the bootstrap-dialog.min.css (or respectively minimal versions). You can build the files yourself following the readme, or get them from the js and css subfolders of the dist folder.

发布评论

评论列表(0)

  1. 暂无评论