html += "<table><tr><td> <label for='id_first_name' ><b>Timezone:</b></label> </td>";
html += '<td><select id="timezone" name="nodes" style="width:300px;margin:5px;">';
{% for tz in all_timezones %}
if('{{tz}}' == 'Asia/Calcutta')
html+='<option value="{{tz}}" selected>{{tz}}</option>';
else
html += '<option value="{{tz}}">{{tz}}</option>';
{% endfor %}
html += '</select>';
html += "</td> </tr>";
</script>
現在,當我想編輯,我知道存儲於前值。而且讓說,作爲亞洲/曼谷如何得到這個值來選擇 爲例
var edit_val="Asia/Bangkok"
$("#timezone selected val[edit_val]")//Sumthing like this
In the drop downlist i want this value to be selected
請給出更多的代碼,並嘗試給我們一個更大的問題的看法 – netadictos 2010-10-20 14:16:43