2011-08-03 56 views
0

XSLT如果复选框被点击的禁用文本框XSLT如果复选框被点击的禁用文本框

<TD colspan="2"> 
         <input type="checkbox" name="City$store1$" onclick="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> 

如果选中复选框我想禁用ID为1001和1002

回答

2

使用您当前为实现同样的测试文本框复选框,而是向输入添加“已禁用”属性:

<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> 
相关问题