<?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 < 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>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端