<script>
function erase(o)
{
alert(document.getElementById(o));
document.getElementById(o).removeChild(document.getElementById(o).getElementsByTagName('tr')[0]);
}
function make()
{
alert("우하하");
var tbl = document.getElementById("tbl");
var tblBody = document.getElementById("tblBody");
// creating all cells
for (var j = 0; j < 2; j++) {
// creates a table row
var row = document.createElement("tr");
for (var i = 0; i < 2; i++) {
// Create a <td> element and a text node, make the text
// node the contents of the <td>, and put the <td> at
// the end of the table row
var cell = document.createElement("td");
var cellText = document.createTextNode("cell is row "+j+", column "+i);
cell.appendChild(cellText);
row.appendChild(cell);
}
// add the row to the end of the table body
tblBody.appendChild(row);
}
tbl.setAttribute("border", "2");
}
</script>
<input type="button" value="start" onclick="make()">
<input type="button" value="delete" onclick="erase('tblBody');">
<table id="tbl">
<tbody id="tblBody">
</tbody>
</table>
function erase(o)
{
alert(document.getElementById(o));
document.getElementById(o).removeChild(document.getElementById(o).getElementsByTagName('tr')[0]);
}
function make()
{
alert("우하하");
var tbl = document.getElementById("tbl");
var tblBody = document.getElementById("tblBody");
// creating all cells
for (var j = 0; j < 2; j++) {
// creates a table row
var row = document.createElement("tr");
for (var i = 0; i < 2; i++) {
// Create a <td> element and a text node, make the text
// node the contents of the <td>, and put the <td> at
// the end of the table row
var cell = document.createElement("td");
var cellText = document.createTextNode("cell is row "+j+", column "+i);
cell.appendChild(cellText);
row.appendChild(cell);
}
// add the row to the end of the table body
tblBody.appendChild(row);
}
tbl.setAttribute("border", "2");
}
</script>
<input type="button" value="start" onclick="make()">
<input type="button" value="delete" onclick="erase('tblBody');">
<table id="tbl">
<tbody id="tblBody">
</tbody>
</table>
꼭 tbody 태그를 넣어야 한다는거 유의!!
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1430 | 18년 전 | 2986 | ||
| 1429 | 18년 전 | 2934 | ||
| 1428 | 18년 전 | 2831 | ||
| 1427 | 18년 전 | 2135 | ||
| 1426 |
|
18년 전 | 2316 | |
| 1425 |
|
18년 전 | 2871 | |
| 1424 |
|
18년 전 | 2966 | |
| 1423 |
frotone
|
18년 전 | 4140 | |
| 1422 | 18년 전 | 6124 | ||
| 1421 | 18년 전 | 2060 | ||
| 1420 | 18년 전 | 2188 | ||
| 1419 | 18년 전 | 1896 | ||
| 1418 | 18년 전 | 1655 | ||
| 1417 | 18년 전 | 2640 | ||
| 1416 | 18년 전 | 1707 | ||
| 1415 | 18년 전 | 1570 | ||
| 1414 | 18년 전 | 4739 | ||
| 1413 | 18년 전 | 1800 | ||
| 1412 | 18년 전 | 1843 | ||
| 1411 | 18년 전 | 1851 | ||
| 1410 | 18년 전 | 1981 | ||
| 1409 | 18년 전 | 3633 | ||
| 1408 | 18년 전 | 1658 | ||
| 1407 | 18년 전 | 1534 | ||
| 1406 | 18년 전 | 1357 | ||
| 1405 | 18년 전 | 1861 | ||
| 1404 | 18년 전 | 1910 | ||
| 1403 |
frotone
|
18년 전 | 3659 | |
| 1402 | 18년 전 | 1979 | ||
| 1401 | 18년 전 | 3116 | ||
| 1400 | 18년 전 | 4741 | ||
| 1399 | 18년 전 | 2868 | ||
| 1398 | 18년 전 | 8069 | ||
| 1397 | 18년 전 | 4069 | ||
| 1396 |
|
18년 전 | 2752 | |
| 1395 | 18년 전 | 1534 | ||
| 1394 | 18년 전 | 2629 | ||
| 1393 | 18년 전 | 5041 | ||
| 1392 | 18년 전 | 5228 | ||
| 1391 |
cncafe
|
18년 전 | 2103 | |
| 1390 |
mixdesign
|
18년 전 | 4356 | |
| 1389 | 18년 전 | 4105 | ||
| 1388 |
mixdesign
|
18년 전 | 4161 | |
| 1387 | 18년 전 | 2282 | ||
| 1386 | 18년 전 | 4191 | ||
| 1385 |
mixdesign
|
18년 전 | 2187 | |
| 1384 | 18년 전 | 3293 | ||
| 1383 | 18년 전 | 4929 | ||
| 1382 | 18년 전 | 1954 | ||
| 1381 |
오디세우스
|
18년 전 | 3417 | |
| 1380 |
mixdesign
|
18년 전 | 1655 | |
| 1379 | 18년 전 | 2753 | ||
| 1378 |
mixdesign
|
18년 전 | 1682 | |
| 1377 | 18년 전 | 2734 | ||
| 1376 |
|
18년 전 | 2559 | |
| 1375 |
|
18년 전 | 1569 | |
| 1374 |
|
18년 전 | 1505 | |
| 1373 |
|
18년 전 | 1755 | |
| 1372 | 18년 전 | 2242 | ||
| 1371 | 18년 전 | 2022 | ||
| 1370 | 18년 전 | 2387 | ||
| 1369 | 18년 전 | 4949 | ||
| 1368 |
mixdesign
|
18년 전 | 1824 | |
| 1367 | 18년 전 | 1269 | ||
| 1366 | 18년 전 | 1382 | ||
| 1365 | 18년 전 | 1343 | ||
| 1364 | 18년 전 | 1097 | ||
| 1363 | 18년 전 | 1087 | ||
| 1362 | 18년 전 | 1416 | ||
| 1361 | 18년 전 | 1378 | ||
| 1360 | 18년 전 | 2355 | ||
| 1359 | 18년 전 | 1232 | ||
| 1358 | 18년 전 | 1616 | ||
| 1357 | 18년 전 | 2108 | ||
| 1356 | 18년 전 | 1290 | ||
| 1355 | 18년 전 | 2841 | ||
| 1354 | 18년 전 | 1281 | ||
| 1353 | 18년 전 | 1660 | ||
| 1352 | 18년 전 | 1507 | ||
| 1351 | 18년 전 | 1463 | ||
| 1350 | 18년 전 | 1253 | ||
| 1349 | 18년 전 | 1085 | ||
| 1348 | 18년 전 | 1675 | ||
| 1347 | 18년 전 | 1123 | ||
| 1346 | 18년 전 | 3626 | ||
| 1345 | 18년 전 | 1718 | ||
| 1344 |
mixdesign
|
18년 전 | 1796 | |
| 1343 | 18년 전 | 1128 | ||
| 1342 | 18년 전 | 1853 | ||
| 1341 | 18년 전 | 1099 | ||
| 1340 | 18년 전 | 1167 | ||
| 1339 | 18년 전 | 1017 | ||
| 1338 | 18년 전 | 1013 | ||
| 1337 | 18년 전 | 1114 | ||
| 1336 |
|
18년 전 | 2588 | |
| 1335 | 18년 전 | 1544 | ||
| 1334 | 18년 전 | 1639 | ||
| 1333 | 18년 전 | 1204 | ||
| 1332 | 18년 전 | 1874 | ||
| 1331 | 18년 전 | 1523 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기