다음 jquery 함수를 사용하여 테이블 행의 드롭 다운 값을 가져옵니다. 그러나 값을 제공하지 않습니다.Jquery를 사용하여 값 양식 드롭 다운 받기
HTML
<select id='statusprocess'><option value='optSelected'>Selected</option><option value='optNotSelected'>Not Selected</option></select>
JQUERY
var select = $(this).closest('tr').find('input[type="select"]').map(function() {
return this.text();
}).get();
어떻게 드롭 다운을 찾아 선택한 옵션 텍스트를 얻을?
대답은 :이
이 표에있는 드롭 다운을 발견하고 선택한 텍스트를 선택 얻을 정확한 방법입니다.
var select = $(this).closest('tr').find('select option:selected').text();
괜찮 았어.
당신도 html을 공유 할 수 있다면 위대 할 것입니다 –
'$ (this) .closest ('tr'). find ('select')','input [type = "select"]' – billyonecan