代碼: <tr> <th>空間性質</th> <td> <input type="hidden" id = "class" value="{$post.post_class}"/> <select class="form-control" name="post[post_class]" id="class2" value="{$post.post_class}"> <option value="0" id="op1">出售</option> <option value="1" id="op2">出租</option> </select> </td> </tr>根據value={$post.post_class}的值而顯示不同的選項值,value只有0,1兩個值。TKS
html中select怎么根據后臺傳來的值選中不同的選項值
開心每一天1111
2018-11-23 18:14:52