私は単純なhtmlを選択しています:
<select id="eventid">
<option value="a">a</option>
<option value="b">b</option>
</select>
私が使用しているスクリプトは、選択値を取得する必要があるこのコードを使用しています。
<script id="template-upload" type="text/x-tmpl">
<tr class="template-upload fade">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<td class="post"><label><input type="hidden" name="userid[]" value="$( "#eventid" ).val()" required></label></td>
x-tmpl スクリプト ヘッダーが原因で機能していないと思いますが、それを使用する必要があります。この tmpl スクリプト内で選択値を取得するにはどうすればよいですか?
ありがとう