先给代码
<script> $("#selector_political_status").val('{{ archive.political_status }}'); </script>
示例:
html代码如下:
<select class="form-control" id="selector_sex" name="sex" required="" value="男"> <option value="男">男</option> <option value="女">女</option> <option value="其他">其他</option> </select>
$("#selector_sex").val('{{ archive.sex }}');//selector_sex这个值要和html里的id值一致