您的位置:首页 > Web前端 > JavaScript

jsp页面常用标签

2014-03-06 16:49 375 查看
1、前台遍历list标签,window.open方法的使用。

     <display:table requestURI="/" id="list"  name="list"   styleClass="displaytable"  defaultsort="0" cellpadding="0" cellspacing="1"      border="1" pagesize="15">

    <display:column title="名称" sortable="true" property="属性名称" width="5%" align="center"/>

    <display:column title="编号"  align="center" width="10%" sortable="true">

           <a href="#" onclick="window.open('spareinfo.dotype=spareapplydetail&apply_code=<c:out value="${aLst.spare_apply_code}"/>' ,'spareapply','width='+window.screen.width*2/3+',height='+window.screen.height*3/5+',left='+window.screen.width/6+',top='+window.screen.height/5+',status=no,fullscreen=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes');">

                            <c:out value="${aLst.spare_apply_code}"/>

                        </a>

                    </display:column>

    </display:table>

2、if判断

      <c:if test="${}">

3、表格制作

   

<style type="text/css">

    table {

     align: center;

     border-collapse: collapse;

    }

    table th {

     border: 1px solid #000;

     font-size:12px;

     padding: 3px 3px 3px 3px;

     text-align: center;

        width: 60px;

    }

    table td {

     border: 1px solid #000;

     font-size:12px;

     padding: 3px 3px 3px 3px;

     text-align: center;

        width: 60px;

    }

</style>

 

    <table>

    <tr>

        <th>单位</th>

        <th>总计</th>

        <th>上级通知</th>

        <th>消缺</th>

        <th>其他临检</th>

        <th>计划检修</th>

        <th>免考</th>

        <th>考核</th>

        <th>临检率</th>

        <th>回退票数</th>

        <th>回退率</th>

    </tr>

    <%

        for (Map<Integer, String> map : mapList) {

           if (map.get(1) != null) {

    %>

        <tr>

            <td><%=map.get(1)==null?" ":map.get(1)%></td>

            <td><%=map.get(2)==null?"":map.get(2)%></td>

            <td><%=map.get(3)==null?"":map.get(3)%></td>

            <td><%=map.get(4)==null?"":map.get(4)%></td>

            <td><%=map.get(5)==null?"":map.get(5)%></td>

            <td><%=map.get(6)==null?"":map.get(6)%></td>

            <td><%=map.get(7)==null?"":map.get(7)%></td>

            <td><%=map.get(8)==null?"":map.get(8)%></td>

            <td><%=map.get(9)==null?"":map.get(9)%></td>

            <td><%=map.get(10)==null?"":map.get(10)%></td>

            <td><%=map.get(11)==null?" ":map.get(11)%></td>

        </tr>

    <%

        } else {

    %>

           <td colspan="11"> </td>

    <%

        } }

    %>

</table>

4、前台显示下拉列表

      <html:select property="specialty_id" styleClass="MySelect" style="width :65%"

                                         onchange="document.all.specid.value='1';document.all.find.value='yes';document.getElementsByTagName('form')[0].submit()">

                                <html-el:options collection="specidLst" property="value" labelProperty="label"/>

                            </html:select>

   屏蔽 style="display:none;"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: