我希望“”选项是下面的选择语句中的默认选项,但它不会默认为该选项。我试过<OPTION value="" selected="selected"></OPTION>
,它不起作用。任何想法将不胜感激。难以置信如何使选择的东西默认
<td class="lblhd">
<SELECT tabindex="71" ID="PS_FORM/MARKET_DATA/Last_Sale_Price_text" NAME="PS_FORM/MARKET_DATA/Last_Sale_Price_text" onchange="last_sale_price_dropdown();">
<OPTION value="" ></OPTION>
<OPTION value="Subject prior sale price/date was not available in public records">
<xsl:if test="PS_FORM/MARKET_DATA/Last_Sale_Price_text = 'Subject prior sale price/date was not available in public records'">
<xsl:attribute name="selected">
<xsl:value-of select="true" />
</xsl:attribute>
</xsl:if>
Subject prior sale price/date was not available in public records.
</OPTION>
<OPTION value="Subject prior sale price/date was not available in MLS">
<xsl:if test="PS_FORM/MARKET_DATA/Last_Sale_Price_text = 'Subject prior sale price/date was not available in MLS'">
<xsl:attribute name="selected">
<xsl:value-of select="true" />
</xsl:attribute>
</xsl:if>
Subject prior sale price/date was not available in MLS.
</OPTION>
</SELECT>
</td>
感谢
我怀疑'last_sale_price_dropdown()'是你的问题所在。您可能想看看 –
'该功能所做的就是检查2个字段并强制某人选择一个选项。 – Daren