<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년 전 | 2981 | ||
| 1429 | 18년 전 | 2924 | ||
| 1428 | 18년 전 | 2818 | ||
| 1427 | 18년 전 | 2130 | ||
| 1426 |
|
18년 전 | 2310 | |
| 1425 |
|
18년 전 | 2865 | |
| 1424 |
|
18년 전 | 2959 | |
| 1423 |
frotone
|
18년 전 | 4131 | |
| 1422 | 18년 전 | 6117 | ||
| 1421 | 18년 전 | 2051 | ||
| 1420 | 18년 전 | 2178 | ||
| 1419 | 18년 전 | 1891 | ||
| 1418 | 18년 전 | 1652 | ||
| 1417 | 18년 전 | 2635 | ||
| 1416 | 18년 전 | 1695 | ||
| 1415 | 18년 전 | 1560 | ||
| 1414 | 18년 전 | 4737 | ||
| 1413 | 18년 전 | 1790 | ||
| 1412 | 18년 전 | 1835 | ||
| 1411 | 18년 전 | 1846 | ||
| 1410 | 18년 전 | 1968 | ||
| 1409 | 18년 전 | 3627 | ||
| 1408 | 18년 전 | 1649 | ||
| 1407 | 18년 전 | 1519 | ||
| 1406 | 18년 전 | 1351 | ||
| 1405 | 18년 전 | 1854 | ||
| 1404 | 18년 전 | 1900 | ||
| 1403 |
frotone
|
18년 전 | 3646 | |
| 1402 | 18년 전 | 1975 | ||
| 1401 | 18년 전 | 3108 | ||
| 1400 | 18년 전 | 4727 | ||
| 1399 | 18년 전 | 2860 | ||
| 1398 | 18년 전 | 8050 | ||
| 1397 | 18년 전 | 4057 | ||
| 1396 |
|
18년 전 | 2740 | |
| 1395 | 18년 전 | 1522 | ||
| 1394 | 18년 전 | 2623 | ||
| 1393 | 18년 전 | 5037 | ||
| 1392 | 18년 전 | 5218 | ||
| 1391 |
cncafe
|
18년 전 | 2092 | |
| 1390 |
mixdesign
|
18년 전 | 4352 | |
| 1389 | 18년 전 | 4098 | ||
| 1388 |
mixdesign
|
18년 전 | 4150 | |
| 1387 | 18년 전 | 2269 | ||
| 1386 | 18년 전 | 4184 | ||
| 1385 |
mixdesign
|
18년 전 | 2173 | |
| 1384 | 18년 전 | 3282 | ||
| 1383 | 18년 전 | 4916 | ||
| 1382 | 18년 전 | 1947 | ||
| 1381 |
오디세우스
|
18년 전 | 3404 | |
| 1380 |
mixdesign
|
18년 전 | 1636 | |
| 1379 | 18년 전 | 2737 | ||
| 1378 |
mixdesign
|
18년 전 | 1666 | |
| 1377 | 18년 전 | 2713 | ||
| 1376 |
|
18년 전 | 2550 | |
| 1375 |
|
18년 전 | 1553 | |
| 1374 |
|
18년 전 | 1492 | |
| 1373 |
|
18년 전 | 1736 | |
| 1372 | 18년 전 | 2237 | ||
| 1371 | 18년 전 | 2014 | ||
| 1370 | 18년 전 | 2379 | ||
| 1369 | 18년 전 | 4919 | ||
| 1368 |
mixdesign
|
18년 전 | 1815 | |
| 1367 | 18년 전 | 1257 | ||
| 1366 | 18년 전 | 1376 | ||
| 1365 | 18년 전 | 1337 | ||
| 1364 | 18년 전 | 1080 | ||
| 1363 | 18년 전 | 1075 | ||
| 1362 | 18년 전 | 1406 | ||
| 1361 | 18년 전 | 1361 | ||
| 1360 | 18년 전 | 2347 | ||
| 1359 | 18년 전 | 1224 | ||
| 1358 | 18년 전 | 1609 | ||
| 1357 | 18년 전 | 2095 | ||
| 1356 | 18년 전 | 1276 | ||
| 1355 | 18년 전 | 2829 | ||
| 1354 | 18년 전 | 1270 | ||
| 1353 | 18년 전 | 1647 | ||
| 1352 | 18년 전 | 1500 | ||
| 1351 | 18년 전 | 1449 | ||
| 1350 | 18년 전 | 1237 | ||
| 1349 | 18년 전 | 1077 | ||
| 1348 | 18년 전 | 1666 | ||
| 1347 | 18년 전 | 1105 | ||
| 1346 | 18년 전 | 3614 | ||
| 1345 | 18년 전 | 1710 | ||
| 1344 |
mixdesign
|
18년 전 | 1790 | |
| 1343 | 18년 전 | 1116 | ||
| 1342 | 18년 전 | 1850 | ||
| 1341 | 18년 전 | 1094 | ||
| 1340 | 18년 전 | 1163 | ||
| 1339 | 18년 전 | 1015 | ||
| 1338 | 18년 전 | 1004 | ||
| 1337 | 18년 전 | 1096 | ||
| 1336 |
|
18년 전 | 2576 | |
| 1335 | 18년 전 | 1544 | ||
| 1334 | 18년 전 | 1636 | ||
| 1333 | 18년 전 | 1203 | ||
| 1332 | 18년 전 | 1872 | ||
| 1331 | 18년 전 | 1517 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기