문제

Is their a way to programmatically select an item in a dashcode list with having the user click on the list? Something like:

var list = document.getElementById("list");
    list.select_item(3);
도움이 되었습니까?

해결책

If it's just an HTML drop-down list (a "select" tag), then you can just set the "selectedIndex" property:

var list = document.getElementById("list");
list.selectedIndex = 3;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top