jquery克隆问题 jquery克隆问题有个tr,我想通过点击添加按钮把这个tr完整的克隆一份到这个tr的下边并且当点及删除时能准确的将克隆的tr删除请举个简单的例子,谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>jquery克隆问题</title><script type="text/javascript" src='./jpack.js'></script></head><body><input type="button" onclick='add()' value='添加'/> <input type="button" onclick='del()' value='删除'/><hr/><table id='tbl' border="1" cellpadding="10" cellspacing="0"> <tr> <td>自由</td> <td>民主</td> </tr></table><script type='text/javascript'>function add() { $("#tbl tr:first-child").clone().prependTo("#tbl"); }function del() { if ($("#tbl tr").length>1) { $("#tbl tr:last-child").remove(); }}</script></body></html> 问个Rewrite的问题 PHP中 SOCKET和 CUR有哪些区别?2者分别用来做什么比较合适 ?请高手赐教了 推荐开源编辑器:notepad++ ,您的得力助手! 有没办法不用浏览器建立websocket的链接??? 利用php如何在网页源文件中统计新闻条数 ajax不乱码,一招搞定 PHP今天刚接触。。。帮帮我呀。。。 难道PHP就总是难登大雅之堂吗?参与者有分! 请问怎么计算两个日期之间的天数? 给分!!!!!!!!!!!!wasy!!!!!! PHPWIND:浏览帖子的时候在标题前加主题分类 PHP的file_put_contents为什么只能输出ANSI编码的TXT文件?
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>jquery克隆问题</title>
<script type="text/javascript" src='./jpack.js'></script>
</head>
<body>
<input type="button" onclick='add()' value='添加'/> <input type="button" onclick='del()' value='删除'/>
<hr/>
<table id='tbl' border="1" cellpadding="10" cellspacing="0">
<tr>
<td>自由</td>
<td>民主</td>
</tr>
</table><script type='text/javascript'>
function add() {
$("#tbl tr:first-child").clone().prependTo("#tbl");
}
function del() {
if ($("#tbl tr").length>1) {
$("#tbl tr:last-child").remove();
}
}
</script>
</body>
</html>