フォームのフォームフィールドのタイプを取得しようとしていますが、コンボボックスで機能しないようです
入力は機能しますが、選択は機能せず、「select-one」と明確に表示されます
<select id="test">
<option value=1>1</option>
</select>
<input type="text" id="test2">
<hr>type of select:
<div id="a"></div>
<hr>type of input
<div id="b"></div>
var f = $('#test').attr('type');
$('#a').html(f);
var f = $('#test2').attr('type');
$('#b').html(f);
私は何かが足りないのですか?またはそれはバグですか?
参照: http: //jsfiddle.net/TZjE5/1/