Twitterのブートストラップアラートボックスに非常に奇妙な問題があります。これが私が実行しようとしていたサンプルです
<script src="js/jquery.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-dialog.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/bootstrap-dialog.css">
<title>Insert title here</title>
<script>
function callMe(){
test();
BootstrapDialog.alert('Bye');
}
function test(){
BootstrapDialog.alert('hello');
}
</script>
</head>
<body>
<input type="button" name="button" value="button" onclick="callMe()"/>
</body>
</html>
結果は次のようになります: こんにちは ----> さようなら
次のような結果が返されます: Bye ----> hello
1 つの Bootstrap アラート ボックスにコメントすると、同じ結果が得られます (ダイログ ボックスの重複ポイントはありません)。
function callMe(){
test();
}
function test(){
alert('inside test');
BootstrapDialog.alert('hello');
alert('outside test');
}
</script>
結果は次のようになります: inside test--->outside test--->hello 結果は次のようになります: inside test--->hello--->outside test