我坚持这一点。如果表单带有选择选项,我想替换编辑框。我有以下代码用于从编辑框中获取值
<input type="text" name="toheat" size="30" class="inputbox" maxlength="50" value="<?php echo $obj->toheat; ?>" />
我该怎么做才能让用户从 certen 2-3 选项中进行选择?你能告诉我如何继续吗?
提前致谢
我坚持这一点。如果表单带有选择选项,我想替换编辑框。我有以下代码用于从编辑框中获取值
<input type="text" name="toheat" size="30" class="inputbox" maxlength="50" value="<?php echo $obj->toheat; ?>" />
我该怎么做才能让用户从 certen 2-3 选项中进行选择?你能告诉我如何继续吗?
提前致谢
您可以使用以下形式的选择框:
<select name="toheat" id="toheat">
<option value="">select</option>
<option value="toHeat1" <?php if($obj->toheat == "toHeat1"){?> selected="selected" <?php } ?>>toHeat1Name</option>
<option value="toHeat2" >toHeat2Name</option>
//and so on
</select>
我希望这能有所帮助