Javascript Dashcode新手:更改按钮';以编程方式创建标签

Javascript Dashcode新手:更改按钮';以编程方式创建标签,javascript,button,dashcode,Javascript,Button,Dashcode,我是MacOSX仪表板开发的新手。现在,我有一个id为b_start的按钮。 单击该按钮时,我希望该按钮的标签更改为“圆形” 现在我试过这些,但都不管用: document.getElementById("b_start").label = "Round"; document.getElementById("b_start").text = "Round"; document.getElementById("b_start").innerText = "Round"; document.getE

我是MacOSX仪表板开发的新手。现在,我有一个id为b_start的按钮。 单击该按钮时,我希望该按钮的标签更改为“圆形”

现在我试过这些,但都不管用:

document.getElementById("b_start").label = "Round";
document.getElementById("b_start").text = "Round";
document.getElementById("b_start").innerText = "Round";
document.getElementById("b_start").object.setValue("Round");
document.getElementById("b_start").value = "Round";

有人知道我如何更改按钮的标签吗

我自己解决了这个问题。只要用这个:

document.getElementById("b_start").object.textElement.innerText = "Round";

document.getElementById(“b_start”).object.setText(“Round”)

此外,每次设置属性时都会搜索DOM元素,这是错误的。Bob Villa提供的答案更好:
document.getElementById("b_start").object.setEnabled(false);