新手求救,节点嵌套问题

zhaoye141134 2012-11-13 05:40:30
<%@page pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@include file="/common/skins/skin0/component.jsp" %>
<html>
<!--
- Author(s): Administrator
- Date: 2012-11-13 15:08:13
- Description:
-->
<head>
<title>Title</title>
<h:css href="/css/style1/style-custom.css"/>
</head>
<body>
<dataform id="deb9d987-2ab9-4426-9c72-f7cc450c3f38">
<h:form name="dataform1" action="java2service.evaluate.flow" checkType="blur" target="_self" method="post" onsubmit="return checkForm(this);">
<input type="hidden" name="_eosFlowAction" value="set"/>
<w:panel id="panel1" width="100%" title="Entity录入">
<table align="center" border="0" width="100%" class="form_table" id="table">
<tr>
<td class="form_label">
姓名
</td>
<td colspan="1">
<h:text property="user/name"/>
</td>
<td class="form_label">
电话
</td>
<td colspan="1">
<h:text property="user/phone"/>
</td>
</tr>
<tr>
<td class="form_label">
社会保障金
</td>
<td colspan="1">
<h:text property="user/socialSecurityNumber"/>
</td>
</tr>
<tr>
<td>
<input type="button" onclick="addRecord();" value="增加" />
</td>
</tr>
<tr id="addresstr">
<td class="form_label">
地址
</td>

<td colspan="1">
<h:text property="user/address" id="user_address"/>
</td>
</tr>
<tr class="form_bottom">
<td colspan="4">
<input type="submit" value="保存" class="button">
<input type="button" value="返回" onclick="javascript:history.go(-1);" class="button">
</td>
</tr>

</table>
</w:panel>
</h:form>
<script >
function addRecord(){
var o = document.getElementById("table");
var tr = document.createElement("tr");
var td = document.createElement("td");
var input=document.createElement("input");
input.type="text";
input.name="aa";
td.innerHTML ="地址";
td.appendChild(input);
tr.appendChild(td);
o.appendChild(tr);
}
</script>
</dataform>
</body>
</html>
我想实现点击“增加按钮”就可以增加一个地址,并且想把地址显示在上个地址的下面,而不是最下面,大家有什么好的意见吗,现在的代码还是不能实现增加一行,请问是哪里的问题!! SOS ~~~~
...全文
127 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhaoye141134 2012-11-13
  • 打赏
  • 举报
回复
哎~~自作孽,不可活
ChinaXtHuLang 2012-11-13
  • 打赏
  • 举报
回复
任你建立100个帐号。结果也是一样。。0%的结贴率

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧