l六:jsp页面各种标签的用法

本文介绍了一种使用JSP标签库实现动态页面效果的方法,包括条件渲染、迭代记录、表单元素状态设置等,为Web开发者提供了一个简单实用的案例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一:when标签

<tdstyle="width:150px">

                            <span>

                            <c:choose>

                                <c:whentest="${model.type==1}">

                                           商业投诉

                                </c:when>

                                <c:whentest="${model.type==7}">

                                           通信投诉

                                </c:when>

                            </c:choose>

                            </span>

                         </td>

二:select

function statuschange()

   {

     $("#pervalue").val('');

   }

 

<tdclass="l-table-edit-td">             

           <selectname="permode" id="permode" ltype="select"onchange="javascript:statuschange();">

                   <optionvalue="0"<c:iftest="${busiCompanyGood.permode==0}">selected</c:if>>百分比</option>

                   <optionvalue="1"<c:iftest="${busiCompanyGood.permode==1}">selected</c:if>>每单固定费用(成交)</option>

                   <optionvalue="2"<c:iftest="${busiCompanyGood.permode==2}">selected</c:if>>每月总包费用</option>

                   <optionvalue="3"<c:iftest="${busiCompanyGood.permode==3}">selected</c:if>>每单固定费用(分配)</option>

                </select>

             

              </td>

三:<if></if>

<div>

              <span>订单号:${orderno}</span>

              <spanstyle="margin-left:200px">四联单号:${billno}</span>

              <spanstyle="margin-left:200px">状态:<s:if test="status==0">待处理</s:if>

                 <s:iftest="status==1">已分配</s:if><s:if test="status==2">处理中</s:if>

                 <s:iftest="status==3">未成交</s:if><s:if test="status==4">成交</s:if>

                 <s:iftest="status==5">关闭</s:if><s:if test="status==6">修改关闭</s:if>

                    <s:iftest="status==10">待解决</s:if><s:if test="status==11">已处理</s:if> </span>

           </div>

四:iterator

<divid=u7class="u7">

      <s:iteratorvalue='sysOperateRecordList'id='operatelist'>

        <s:iftest="#operatelist.actionid==104 ">

     

       <div style="font-size:10px; font-weight:normal; font-style:normal; color:#333333;">

           <div>

              <s:propertyvalue='#operatelist.action'/>

           </div>

           <div>

              <span><s:datename='#operatelist.operatetime'format="yyyy-MM-dd HH:mm:ss"/></span>

           </div>

        </div>

        <div

           style="font-size:10px; font-weight:normal; font-style:normal; color:#333333;">

           受理商家:&nbsp;<span>${company.companyname }</span>

        </div>

  

      </s:if>

      </s:iterator>

      </div>

五:默认选择上一次选中的checkbox。

<tr>

                <tdclass="l-table-edit-td"valign="top">首页显示</td>

                <td class="l-table-edit-td"style="width:160px">

                    <inputid="rbtnl_0"type="radio"name="isnotice"value="1" <c:iftest="${isnotice==1}">checked</c:if>/><label for="rbtnl_0"></label>&nbsp;&nbsp;&nbsp;&nbsp;

                  <inputid="rbtnl_1"type="radio"name="isnotice"value="0" <c:if test="${isnotice==0||isnotice==''}">checked</c:if>/><labelfor="rbtnl_1"></label>

                </td>              

                <tdclass="l-table-edit-td"style="width:160px"></td>

                <tdalign="left"></td>

            </tr>  

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值