DashCode Newbie : 프로그래밍 방식으로 버튼의 레이블을 변경합니다

StackOverflow https://stackoverflow.com/questions/1238523

  •  11-09-2019
  •  | 
  •  

문제

Mac OS X 대시 보드 개발을 처음 사용했습니다. 이제 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");

document.getElementById("b_start").object.setEnabled(false);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top