⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newtable.ftl

📁 JSP(Java Server Pages)是由Sun Microsystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。 JSP技术是用JAVA语言作为脚本语言的
💻 FTL
字号:
<#macro newtable cols type normalOperate=[] batchOperate=[] params=["pageNo"] gotoPageAction="Com_list" 
value=pagination operateCol="常规操作" width="98%" keyId="id" batchId="ids" operateCol="相关操作" bgcolor="#d8d8d8" border="0" align="center" gotoPageAction="Com_list">
<@s.form theme="simple" id="tableForm" action="${(batchOperate[0]['action'])!}">
<div id="list" class="outer list">
<table width="${width}" cellspacing="1" cellpadding="0" align="${align}" bgcolor="${bgcolor}" border="${border}" id="list_table">
<thead align="left" bgcolor="#ffffff">
<tr>
<th><input type="checkbox" name="allCheck" value="checkbox" onclick="checkAll(this.form);" /></th>
<#list cols as col>
<th>${col.label}</th>
</#list>
<#if normalOperate?size != 0>
<th>${operateCol}</th>
</#if>
</tr>
</thead>
<tbody>
<#list value.list as row>
<tr onmouseover="this.style.backgroundcolor='#F5F5F5'" onmouseout="this.style.backgroundcolor=''">
<td>
<input type="checkbox" name="${batchId}" value="${row[keyId]}" />
</td>
<#list cols as col>
<td>
<#if col.isPrice??>
¥:<input phoneId="${row[keyId]}" marketId="${col.marketId}" type="text" size="6" value="${("row.${col['name']}"?eval)!?html}" onfocus="changeStyle(this)" onchange="changePrice(this)" onclick="clickText(this)"/>
<#elseif col.isLocalPrice??>
¥:<input phoneId="${row[keyId]}" type="text" size="6" value="${("row.${col['name']}"?eval)!?html}" onfocus="changeStyle(this)" onchange="changePrice(this)" onclick="clickText(this)"/>
<#elseif col.isurl??>
<input phoneId="${row[keyId]}" type="text" size="36" value="${("row.${col['name']}"?eval)!?html}" onfocus="changeStyle(this)" onchange="changePrice(this)" onclick="clickText(this)"/>
<#elseif col.isptm??>
<a href="${base}${col.action}${("row.${col['case']}"?eval)!?html}">${("row.${col['name']}"?eval)!?html}</a>
<#elseif col.content??>
<#if ("row.contentReply"?eval)??>
<font color="#0000FF">${("row.title"?eval)!?html}</font>
<#else>
${("row.title"?eval)!?html}
</#if>
<#elseif col.isCur??>
<#if ("row.isCurrent"?eval)>
已审核
<#else>
未审核
</#if>
<#elseif col.isSex??>
<#if ("row.sex"?eval)>
<#else>
</#if>
<#elseif col.istype??>
<#if ("row.trType"?eval)==1>
求购
<#elseif ("row.trType"?eval)==2>
出售
</#if>
<#elseif col.ispt??>
<#if ("row.phoneType"?eval)==1>
全新
<#elseif ("row.phoneType"?eval)==2>
购买未使用过
<#elseif ("row.phoneType"?eval)==3>
二手
<#else>
其他
</#if>
<#else>
${("row.${col['name']}"?eval)!?html}
</#if>
</td>
</#list>
<td>
  <#list normalOperate as operate>
  <@s.url id="url" action='${operate["action"]}'>
  <#if operate.ischeck??>
    <@s.param name="${keyId}">${row[keyId]}</@s.param>
    <#if ("row.isCurrent"?eval)>
    <@s.param name="check">0</@s.param>
    <#else>
    <@s.param name="check">1</@s.param>
    </#if>
   <#else>
    <@s.param name="${keyId}">${row[keyId]}</@s.param>
   </#if>
    <#list params as param>
      <@s.param name="${param}" value="${param}" />
    </#list>
  </@s.url>
  <a href="${url}" <#if (operate.confirm)??>onclick="return confirm('${operate.confirm}')"</#if>>
  <#if operate.ischeck??>
   <#if ("row.isCurrent"?eval)>
   ${operate["names"]}
   <#else>
   ${operate["namef"]}
   </#if>
  <#else> 
  ${operate["name"]}
  </#if>
  </a>
  </#list><#t />
</td>
</tr>
</#list>
</tbody>
</table>
<#include "table_inc_batchoperate.ftl" />
<#include "page.ftl">
<@p.page type=type value=pagination gotoPageAction=gotoPageAction  params=["pageNo"] table="tableForm"/>
</div>
</@s.form>
<script language="javascript">
function checkAll(form) {
try{
    for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "allCheck")
       e.checked = form.allCheck.checked;
    }
  } catch(e) {
    alert('checkAll方法出错或不存在');
  }
}
</script>
</#macro>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -