2014-01-07 09:54:34|
- 通过后台传出的值进行选择默认项的设置
<select name="user_id" id="user_id"> <option value="">所有用户</option> {% for user in users %} <option value="{{ user.user_phone }}" {{ ' selected="selected"' if user.user_phone == user_chosen else '' }}>{{ user.user_phone }}</option> {% endfor %} </select>