开发者

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&#160;&#160;&#160;&#160;&#160;&#160;
                    <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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜