XSLT if Checkbox Clicked disable the Textbox
XSLT if Checkbox Clicked disable the Textbox
<TD colspan="2">
<input type="checkbox" name="City$store1$" oncl开发者_如何学Cick="SetBonPerAcre(this)" TabIndex="19">
<xsl:if test="City/@store1=1">
<xsl:attribute name="checked"></xsl:attribute>
</xsl:if>
</input>fee      
<input type="text" id="1001" maxlength="100" value="{City/@RE}"></input>
<input type="text" id="1002" maxlength="100" value="{City/@E}"></input>
</TD>
if Checkbox Checked i want disable textboxes with id 1001 and 1002
Use the same test that you have currently implemented for the checkbox, but instead add a 'disabled' attribute to the inputs:
<input type="text" id="1001" maxlength="100" value="{City/@RE}">
<xsl:if test="City/@store1=1">
<xsl:attribute name="disabled">true</xsl:attribute>
</xsl:if>
</input>
<input type="text" id="1002" maxlength="100" value="{City/@E}">
<xsl:if test="City/@store1=1">
<xsl:attribute name="disabled">true</xsl:attribute>
</xsl:if>
</input>
精彩评论