-1
$.each( headings, function() {
      $('#heading').append($("<option />",{ value: this, text: this }));
});

HTMLバリデーターはこれを示しています

<option value="abc"></option>
<option value="xyz"></option>
</select>

オプションのテキストが印刷されません。ハッシュを使用しても問題なく動作します

4

1 に答える 1

0
$.each( headings, function() {
      $('#heading').append($("<option value="+this+">"+this+"</option>"));
});
于 2013-03-22T03:33:37.370 に答える