zoukankan      html  css  js  c++  java
  • JMJS系统总结系列HTML标签在XSLT 中的应用(二)

    文本框:

    <input name="Accept/ApprovalItemName" align="left" type="text" title="申请项目" myClass="txt|y|0|100" maxlength="100" class="form_input w_bfb98" id="Accept/ApprovalItemName" >

    <xsl:attribute name ="value">

    <xsl:value-of select="Accept/ApprovalItemName"/>

    </xsl:attribute>

    </input>

    时间控件:

    <input type="text" name="Accept/AcceptDate" class="Wdate w_bfb98" title="受理日期" myClass="txt|y|0|25" maxlength="25" id="Accept/AcceptDate" style="45%;" onclick="javascript:WdatePicker();">

    <xsl:attribute name="value">

    <xsl:call-template name="FormatDate">

    <xsl:with-param name="DateTime" select="Accept/AcceptDate"/>

    </xsl:call-template>

    </xsl:attribute>

    </input>

    textarea多行文本框:

    <textarea name="Accept/Remarks" id="Accept/Remarks" maxlength="2000" cols="45" rows="5" class="form_input txtarea_h85 w_bfb98">

    <xsl:value-of select="Accept/Remarks"/>

    </textarea>

    chackbox复选框:

    <input type="checkbox" id="IsExchange" iid="Accept/IsExchange" value="1" onclick="checkedYesNo(this);">

    <xsl:if test="Accept/IsExchange=1">

    <xsl:attribute name="checked"></xsl:attribute>

    </xsl:if>

    </input>

    <input type="hidden" name="Accept/IsExchange" id="Accept/IsExchange">

    <xsl:attribute name="value">

    <xsl:value-of select="Accept/IsExchange"/>

    </xsl:attribute>

    </input>

    <label for="IsExchange">是否交换到市行政审批平台</label>

    通过脚本checkedYesNo(this)设置隐藏控件IsExchange的值,提交时,保存IsExchange的值。

    select下拉选择框:

    <select name="Accept/IsAccept" id="Accept/IsAccept" class="form_input w_bfb80" onchange="GetAcceptNumber(this);">

    <option value=""></option>

    <option value="1">

    <xsl:if test="Accept/IsAccept=1">

    <xsl:attribute name="selected"></xsl:attribute>

    </xsl:if>已受理

    </option>

    <option value="2">

    <xsl:if test="Accept/IsAccept=2">

    <xsl:attribute name="selected"></xsl:attribute>

    </xsl:if>不受理

    </option>

    </select>

    代码选择框:

    <input name="Accept/Project/TradeTypeName" type="text" title="行业类别及代码" myClass="txt|y|0|255" readonly="true" class="form_input w_bfb80" id="Accept/Project/TradeTypeName">

    <xsl:attribute name="value">

    <xsl:value-of select="Accept/Project/TradeTypeName"/>

    </xsl:attribute>

    </input>

    <input name="Accept/Project/TradeTypeCodeID" type="hidden" id="Accept/Project/TradeTypeCodeID" >

    <xsl:attribute name="value">

    <xsl:value-of select="Accept/Project/TradeTypeCodeID"/>

    </xsl:attribute>

    </input>

    &#160;&#160;<img src="images/icon_upload.gif" width="16" height="16" onclick="javascript:SelectTradeType();"></img>

    a.通过SelectTradeType()脚本设置隐藏控件TradeTypeCodeID的值,提交时,保存TradeTypeCodeID的值。

    b.对于代码选择框,必须设置隐藏控件TradeTypeCodeID的属性,否则,编辑保存时,可能会提交空值。最终,导致原来填写的值丢失。

    <xsl:attribute name="value">

    <xsl:value-of select="Accept/Project/TradeTypeCodeID"/>

    </xsl:attribute>

    radio单选框:

    <input TYPE="radio" id="ProjectKind0" name="Accept/Project/ProjectKind" value="0">

    <xsl:if test="Accept/Project/ProjectKind = 0">

    <xsl:attribute name="checked">

    </xsl:attribute>

    </xsl:if>

    <label for="ProjectKind0">新建</label>

    </input>

    <xsl:text disable-output-escaping="yes">&#160;&#160;</xsl:text>

    <input TYPE="radio" id="ProjectKind2" name="Accept/Project/ProjectKind" value="1">

    <xsl:if test="Accept/Project/ProjectKind = 1">

    <xsl:attribute name="checked">

    </xsl:attribute>

    </xsl:if>

    <label for="ProjectKind2">改扩建</label>

    </input>

    <xsl:text disable-output-escaping="yes">&#160;&#160;</xsl:text>

    <input TYPE="radio" id="ProjectKind1" name="Accept/Project/ProjectKind" value="2">

    <xsl:if test="Accept/Project/ProjectKind = 2">

    <xsl:attribute name="checked">

    </xsl:attribute>

    </xsl:if>

    <label for="ProjectKind1">技术改造</label>

    Name属性设置的值一致,提交时,只提交一个值。

    学习的路上,分享的知识有不当的地方,希望大家指出。 感谢大家的阅读,希望这些分享能够给您带来帮助。
  • 相关阅读:
    如何不加班,以前问题的答案
    django部署
    djangocms安装技巧
    django_cms安装技巧
    sublime text 3插件
    昨日总结2016年1月11日
    django例子,question_text为中文时候报错
    关于django访问默认后台admin的时候提示403错误,
    laravel安装学习步骤
    关于composer安装插件时候提示找不到fxp插件时候的解决办法
  • 原文地址:https://www.cnblogs.com/lanchong/p/2159902.html
Copyright © 2011-2022 走看看