1
如何讓dijit.Dialog
在給定的時間內淡出?有什麼方法可以定義它嗎?Dojo dijit.Dialog動畫
我在一個方法中創建了上面的對話框。但我需要經常調用這個方法。所以它會創建多個對話框。那麼如何阻止(不出現)其他對話框,直到可見對話框變淡?
如何讓dijit.Dialog
在給定的時間內淡出?有什麼方法可以定義它嗎?Dojo dijit.Dialog動畫
我在一個方法中創建了上面的對話框。但我需要經常調用這個方法。所以它會創建多個對話框。那麼如何阻止(不出現)其他對話框,直到可見對話框變淡?
<script>
// Require the Dialog class
dojo.require("dijit.Dialog");
// Create counter
var counter = 1;
// Create a new Dialog
function createDialog(first) {
// Create a new dialog
var dialog = new dijit.Dialog({
// Dialog title
title: "New Dialog " + counter,
// Create Dialog content
content: (!first ? "I am a dialog on top of other dialogs" : "I am the bottom dialog") + "<br /><br /><button onclick='createDialog();'>Create another dialog.</button>"
});
dialog.show();
counter++;
} </script> <button onclick="createDialog(true);">Create New Dialog</button>