我尝试将dropdown / select元素添加到页面中,如下所示:
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
(值(东方等)现在是伪造的占位符 - 我只是一步一步,第一步是看它是否会显示在页面上 - 它不会。< / p>
html表的最后一部分,在更多的上下文中显示,是:
<td nowrap align="left" valign="top">
<select name="TimeZone" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
<font color="#000000" style="font: 8pt arial"> </font>
<font color="#000000" style="font: 8pt arial">Cut-Off Times </font>
<font color="#000000" style="font: 8pt arial">Same Day: </font>
<input name="CutOffTimeSD" type="text" style="font: 8pt arial" size="1" maxlength="5" onfocus="this.select();" onchange="UpdateFlag=true;" value=" ">
<font color="#000000" style="font: 8pt arial"> </font>
<font color="#000000" style="font: 8pt arial">Next Day: </font>
<input name="CutOffTime" type="text" style="font: 8pt arial" size="1" maxlength="5" onfocus="this.select();" onchange="UpdateFlag=true;" value="10:00">
</td>
</tr>
<tr>
<td nowrap align="left" valign="top">
<font color="#000000" style="font: 8pt arial">Options: </font>
</td>
<td nowrap align="left" valign="top">
<input name="SurveyFlag" type="checkbox" style="font: 8pt arial" size="1" maxlength="1" onfocus="this.select();" onchange="UpdateFlag=true;" value="-1" >
<font color="#000000" style="font: 8pt arial">Participate in online surveys </font>
</td>
</tr>
<tr>
<td nowrap align="left" valign="top">
<font color="#000000" style="font: 8pt arial">Email: </font>
</td>
<td nowrap align="left" valign="top">
<input name="Email" type="text" style="font: 8pt arial" size="100" maxlength="100" onfocus="this.select();" onchange="UpdateFlag=true;" value="">
</td>
</tr>
<tr>
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
</tr>
</table>
上面的代码在显示时从页面中拉出(通过上下文“查看源”菜单项)。
那么为什么“子类别”下拉列表不显示?电子邮件标签和右侧的长文本框是最后可见的内容,即使htmlselect应该显示在它下面,基于html。
答案 0 :(得分:1)
您错过了<td>
代码。
尝试
<tr>
<td>
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
</td>
</tr>