• mayaacomplextable


    <?xml version="1.0" encoding="UTF-8"?>
    <m:mayaa xmlns:m="http://mayaa.seasar.org"
    	xmlns:s="http://sastruts.seasar.org"
    	xmlns:f="http://sastruts.seasar.org/functions"
    	xmlns:bean="http://jakarta.apache.org/struts/tags-bean"
    	xmlns:html="http://jakarta.apache.org/struts/tags-html"
    	xmlns:c="http://java.sun.com/jsp/jstl/core"
    	xmlns:fmt="http://java.sun.com/jstl/fmt"
    	xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <m:beforeRender><![CDATA[
      var idxs = [2,1,4,2,3,6,1];
      var buf = [];
    	for (var i in idxs){
    	for (var j = 0; j < idxs[i]; j++){
    		if (j == 0 && idxs[i] == 1){
    			buf.push('<tr>');
    				buf.push('<td>NoNoNo</td>');
    				buf.push('<td>NaNaNa</td>');
    				buf.push('<td>girl</td>');
    				buf.push('<td>Jiangxi</td>');
    				buf.push('<td>列</td>');
    			buf.push('</tr>');
    			j = idxs[i] + 2;
    		} else if (j == 0 && idxs[i] > 1){
    			buf.push('<tr>');
    			buf.push('<td>列</td>');
    			buf.push('<td rowspan=' + idxs[i] + '>跨行</td>');
    			buf.push('<td>列</td>');
    			buf.push('<td rowspan=' + idxs[i] + '>跨行</td>');
    			buf.push('<td>列</td>');
    			buf.push('</tr>');
    		} else{
    			buf.push('<td>列fuck</td>');
    			buf.push('<td>列fuck</td>');
    			buf.push('<td>列</td>');
    			buf.push('</tr>');
    		}
    	}
      }
      var content = buf.join();
    ]]></m:beforeRender>	
    		<m:for m:id="loop" 
    			init="${var idx = 0}" 
    			test="${idx &lt; 10}" after="${idx++}" max="-1" >
    			${content}
    		</m:for>
    </m:mayaa>
    
    

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Create by dolphin</title>
    </head>
    <body>
    	<table border="1">
    		<tr id="header">
    			<th>name</th>
    			<th>sex</th>
    			<th>age</th>
    			<th>school</th>
    			<th>myname</th>
    		</tr>
    			<span id="loop">
    				<tr id="content">
    					<td>Dummy content1</td>
    					<td>Dummy content2</td>
    					<td>Dummy content3</td>
    				</tr>
    			</span>
    	</table>
    </body>
    </html>
  • 相关阅读:
    ( 转 ) Mysql group_concat 的反向应用实现(Mysql列转行)
    ( 转 ) 优化 Group By -- MYSQL一次千万级连表查询优化
    ( 转 ) mysql复合索引、普通索引总结
    ( 转 ) 数据库BTree索引、Hash索引、Bitmap位图索引的优缺点
    ( 转 ) mysql 实战 or、in与union all 的查询效率
    ( 转 ) MySQL高级 之 explain执行计划详解
    ( 转 ) UML 类图
    ( 转 ) .net 操作 JWT
    windows 常用命令
    windows 执行bat脚本
  • 原文地址:https://www.cnblogs.com/qwop/p/6637243.html
Copyright © 2020-2023  润新知