您好,我無法將新按鈕設置爲禁用。 我使用道場1.8Dojo:如何設置禁用新按鈕
見下面我的代碼: -
require(["dojo/parser", "dijit/layout/BorderContainer",
"dijit/form/Button","dojo/on","dijit/form/Select",
"dojo/store/Memory", "dojo/request","dojo/domReady!"
],
function(parser, BorderContainer, Button, on, Select, Memory, request)
{
var btn4 = new Button // Button, not button
({
label: "Number of cards",
this.set("disabled", false) // This code that disables the button
},"btn4");
btn4.startup();
})
我不能在道場找到幫助或谷歌它。
令人驚訝的是,你是對的。我可以用button.set('disabled',true)禁用一個按鈕,但不能用button.set('disabled',false)重新啓用它 - 它似乎在某處轉換爲false => null。 button.setDisabled(false)方法起作用。我認爲這是一個道場錯誤。 –