admin管理员组

文章数量:1356882

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.

本文标签: javascriptBootstrapDialogalert() not showing upStack Overflow