클릭 기능을 바인드하고 변경시 선택 옵션 값 속성을 다시 가져올 수있는 선택 메뉴가 있습니다.변경시 jquery를 사용하여 선택 메뉴의 값을 얻는 방법
select = $('#select_networks').selectmenu();
//bind the change of network/group
select.bind("change", function(event, ui) {
//need to figure out the selected elements value attribute
});
이 값 벌금를 얻었으나, 질문을 따릅니다. 임의의 속성도 가져올 수 있습니까? 예를 들어 select 옵션에 유형 필드를 설정했는데 alert ($ (this) .attr ("type")); 그러나 나는 정의되지 않는다. – Brian
코드가 업데이트되었습니다. –