庄生晓梦

庄生晓梦迷蝴蝶

博客园 首页 新随笔 联系 订阅 管理
  164 随笔 :: 3 文章 :: 1 评论 :: 74038 阅读
<?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>
posted on   qwop  阅读(213)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
点击右上角即可分享
微信分享提示