81,094
社区成员
发帖
与我相关
我的任务
分享
<table>
<tr>
<logic:iterate name="youname" id="temp">
<td><bean:write name="temp" property="yourprop" /></td>
</logic:iterate>
</tr>
</table>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
</style>
<script>
var i=1;
function addRow(){
var table=document.getElementById("theTable");
var theRow=table.insertRow();//在table中添加一行,可以指定行的位置,如table.insertRow(0)始终在最上面添加新行
var theTD=theRow.insertCell();//在新添加行中添加一个td,同理可以指定td的位置
theTD.innerText="hello "+i;
i++;
}
function removeRow(){
var table=document.getElementById("theTable");
table.deleteRow();
}
</script>
</head>
<body>
<div>
<input type="button" value="添加一行" onclick="addRow()" />
<input type="button" value="删除一行" onclick="removeRow()"/>
</div>
<table id="theTable">
</table>
</body>
</html>
<table>
<tr>
<%
while(rs.next()){
%>
<td><%=rs.getString(1)%></td>
<%
}
%>
</tr>
</table>