<tr> 
      <td width="148" bgcolor="#FFFFFF"><div align="center" class="STYLE2">
        <div align="right" class="STYLE4">性别:</div>
      </div></td>
      <td width="443" bgcolor="#FFFFFF" height="41"> <label>
        <select name="sex">
  <option>  </option>
          <option>  男  </option>
          <option>  女  </option>
        </select>
      </label></td>
    </tr>

解决方案 »

  1.   

    性别sex的字段类型是tinyint吧?假如0=男 1=女
    <select name="sex">
        <optgroup label="性别">
            <option {if $sex==0}selected="selected"{/if}>  男  </option>
            <option {if $sex==1}selected="selected"{/if}>  女  </option>
        </optgroup>
    </select>
      

  2.   

    如果是varchar类型的该怎么改呢?
      

  3.   

    你的option是如何输出的? 输出时判断一下不就可以了。
      

  4.   


    <option {if $sex=='男'}selected="selected"{/if}>  男  </option>
    <option {if $sex=='女'}selected="selected"{/if}>  女  </option>