<script language="javascript">
function rowCopy(){
var tbl = document.getElementById("tbl");
var node = {};
node = document.getElementById("tbl").firstChild.cloneNode(1);
document.getElementById("tbl").appendChild(node);
}
</script>
<a href="javascript:rowCopy();">복사</a>
<table border=1 id="tbl">
<tr>
<td bgcolor="#EEEEEE" style="border:'1 solid #777777'">아싸</td>
<td bgcolor="yellow" >거시기</td>
<td bgcolor="gray">잘될까</td>
<td bgcolor="green">잠안자고</td>
<td bgcolor="blue">했는데</td>
<td bgcolor="orange">잘되겠지?</td>
</tr>
</table>
<script language="javascript">
function origin(){
img1 = document.createElement('img');
img1.setAttribute('id', 'aaa');
img1.src = 'http://www.phpschool.com/images/level_point_info.gif';
document.body.appendChild(img1);
}
function copyn(){
img2 = img1.cloneNode(1);
document.body.appendChild(img2);
}
</script>
<html>
<body>
<a href="javascript:origin();">원본 생성</a><br>
<a href="javascript:copyn();">복사(계속 눌러보세요)</a>
</body>
</html>
function rowCopy(){
var tbl = document.getElementById("tbl");
var node = {};
node = document.getElementById("tbl").firstChild.cloneNode(1);
document.getElementById("tbl").appendChild(node);
}
</script>
<a href="javascript:rowCopy();">복사</a>
<table border=1 id="tbl">
<tr>
<td bgcolor="#EEEEEE" style="border:'1 solid #777777'">아싸</td>
<td bgcolor="yellow" >거시기</td>
<td bgcolor="gray">잘될까</td>
<td bgcolor="green">잠안자고</td>
<td bgcolor="blue">했는데</td>
<td bgcolor="orange">잘되겠지?</td>
</tr>
</table>
<script language="javascript">
function origin(){
img1 = document.createElement('img');
img1.setAttribute('id', 'aaa');
img1.src = 'http://www.phpschool.com/images/level_point_info.gif';
document.body.appendChild(img1);
}
function copyn(){
img2 = img1.cloneNode(1);
document.body.appendChild(img2);
}
</script>
<html>
<body>
<a href="javascript:origin();">원본 생성</a><br>
<a href="javascript:copyn();">복사(계속 눌러보세요)</a>
</body>
</html>