https://i.imgur.com/aLT1fdM.png
https://i.imgur.com/rppnpbo.png
Python/django环境
1
CodeDrift OP |
2
hpfs0 2015 年 4 月 29 日
$("#detial").find("option[value=这里可以GET得到]").attr("selected",true);
|
4
CodeDrift OP @hpfs0 忘记打#了。。不行。
alert($("#detail").find("option[value='2']").val()); alert($('#detail option:first').val()); 都不行。。 |
9
ALeo 2015 年 4 月 29 日 $( "#myselect option:selected" ).val()
|
10
hpfs0 2015 年 4 月 29 日
@Anybfans 刚才试了下,用$("#detail option").each(function() { this.selected = (this.value == "3"); });就可以了。
|
11
CodeDrift OP |
12
CodeDrift OP 貌似必须放$.post里面。。出来就不行了。。
|