<head>
<script>
function addTime(){
$('#tb tr:last').append($(this).parent('tr'));
}
</script>
</head>
<table class="tb">
<tr id="one"><td><a href="#" onclick="addTime();"><fmt:message key="navigation.add"/></a></td>
<td><fmt:message key="teacherneed.startweek.title"/>:第 <form:select path="teacherNeedWeek.startWeek" items="${weeks}" required="true"/>周</td>
<td><fmt:message key="teacherneed.endweek.title"/>:第 <form:select path="teacherNeedWeek.endWeek" items="${weeks}" required="true"/>周</td>
<td><fmt:message key="teacherneed.weekday.title"/>:<form:select class="easyui-combobox" path="weekday" items="${weekdays}" required="true" multiple="true"
panelHeight="auto"/></td>
<td><fmt:message key="teacherneed.class.title"/>:<form:select class="easyui-combobox" path="weekday" items="${schoolClasses}" required="true" multiple="true"
panelHeight="auto"/></td></tr>
</table>
addTime函数该怎么改啊?
<a href="#" onclick="addTime();">改为<a href="#" onclick="addTime(this);">
function addTime(el){
var $this = $(el.parentNode.parentNode);
$this.after($this.clone());
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。