根据xsl变量决定页面某些属性

- 中国WEB开发者网络 (http://www.webasp.net)
-- 技术教程 (http://www.webasp.net/article/)
--- 根据xsl变量决定页面某些属性 (http://www.webasp.net/article/26/25544.htm)
-- 作者:未知
-- 发布日期: 2005-07-06
 

 根据xsl变量决定页面某些属性

首先定义xsl变量

<xsl:variable name="autoMode" select="item/autoMode"/>

然后进行判断    

<tr>
          <th width="" nowrap="">自动购买</th>
          <td>
           <input type="radio" name="autoMode" value="1" onclick="doItDoYouWant(this)">
            <xsl:if test="$autoMode='1' ">
             <xsl:attribute name="checked">
</xsl:attribute>
            </xsl:if>
           </input>
           </td>
         </tr>


webasp.net