<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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 185 | ||
| 8229 | 9년 전 | 166 | ||
| 8228 |
커네드커네드
|
9년 전 | 202 | |
| 8227 | 9년 전 | 245 | ||
| 8226 | 9년 전 | 266 | ||
| 8225 | 9년 전 | 245 | ||
| 8224 | 9년 전 | 253 | ||
| 8223 | 9년 전 | 223 | ||
| 8222 |
|
9년 전 | 290 | |
| 8221 | 9년 전 | 190 | ||
| 8220 | 9년 전 | 230 | ||
| 8219 | 9년 전 | 206 | ||
| 8218 | 9년 전 | 249 | ||
| 8217 |
star3840
|
9년 전 | 211 | |
| 8216 | 9년 전 | 284 | ||
| 8215 | 9년 전 | 225 | ||
| 8214 | 9년 전 | 332 | ||
| 8213 | 9년 전 | 294 | ||
| 8212 | 9년 전 | 206 | ||
| 8211 | 9년 전 | 375 | ||
| 8210 | 9년 전 | 370 | ||
| 8209 | 9년 전 | 451 | ||
| 8208 | 9년 전 | 340 | ||
| 8207 | 9년 전 | 349 | ||
| 8206 |
|
9년 전 | 292 | |
| 8205 | 9년 전 | 269 | ||
| 8204 | 9년 전 | 253 | ||
| 8203 | 9년 전 | 334 | ||
| 8202 | 9년 전 | 249 | ||
| 8201 | 9년 전 | 289 | ||
| 8200 | 9년 전 | 293 | ||
| 8199 | 9년 전 | 314 | ||
| 8198 | 9년 전 | 281 | ||
| 8197 | 9년 전 | 264 | ||
| 8196 | 9년 전 | 684 | ||
| 8195 | 9년 전 | 270 | ||
| 8194 | 9년 전 | 386 | ||
| 8193 | 9년 전 | 298 | ||
| 8192 | 9년 전 | 306 | ||
| 8191 | 9년 전 | 265 | ||
| 8190 | 9년 전 | 246 | ||
| 8189 | 9년 전 | 305 | ||
| 8188 | 9년 전 | 240 | ||
| 8187 | 9년 전 | 256 | ||
| 8186 | 9년 전 | 251 | ||
| 8185 | 9년 전 | 418 | ||
| 8184 | 9년 전 | 209 | ||
| 8183 | 9년 전 | 416 | ||
| 8182 | 9년 전 | 285 | ||
| 8181 | 9년 전 | 242 | ||
| 8180 | 9년 전 | 816 | ||
| 8179 | 9년 전 | 591 | ||
| 8178 | 9년 전 | 450 | ||
| 8177 |
kiplayer
|
9년 전 | 447 | |
| 8176 | 9년 전 | 478 | ||
| 8175 | 9년 전 | 365 | ||
| 8174 | 9년 전 | 356 | ||
| 8173 | 9년 전 | 449 | ||
| 8172 | 9년 전 | 329 | ||
| 8171 | 9년 전 | 289 | ||
| 8170 | 9년 전 | 405 | ||
| 8169 |
커네드커네드
|
9년 전 | 361 | |
| 8168 | 9년 전 | 444 | ||
| 8167 | 9년 전 | 432 | ||
| 8166 | 9년 전 | 334 | ||
| 8165 | 9년 전 | 275 | ||
| 8164 | 9년 전 | 410 | ||
| 8163 | 9년 전 | 413 | ||
| 8162 | 9년 전 | 397 | ||
| 8161 | 9년 전 | 409 | ||
| 8160 |
|
9년 전 | 630 | |
| 8159 | 9년 전 | 575 | ||
| 8158 | 9년 전 | 372 | ||
| 8157 | 9년 전 | 489 | ||
| 8156 | 9년 전 | 361 | ||
| 8155 | 9년 전 | 369 | ||
| 8154 |
00년생용띠
|
9년 전 | 700 | |
| 8153 | 9년 전 | 337 | ||
| 8152 |
|
9년 전 | 519 | |
| 8151 | 9년 전 | 510 | ||
| 8150 | 9년 전 | 629 | ||
| 8149 |
Jangfolk
|
9년 전 | 483 | |
| 8148 | 9년 전 | 300 | ||
| 8147 | 9년 전 | 482 | ||
| 8146 | 9년 전 | 567 | ||
| 8145 | 9년 전 | 521 | ||
| 8144 | 9년 전 | 488 | ||
| 8143 | 9년 전 | 318 | ||
| 8142 | 9년 전 | 535 | ||
| 8141 | 9년 전 | 481 | ||
| 8140 | 9년 전 | 1044 | ||
| 8139 | 9년 전 | 387 | ||
| 8138 |
전갈자리남자
|
9년 전 | 492 | |
| 8137 | 9년 전 | 527 | ||
| 8136 | 9년 전 | 861 | ||
| 8135 |
|
9년 전 | 900 | |
| 8134 |
PlayPixel
|
9년 전 | 642 | |
| 8133 |
|
9년 전 | 549 | |
| 8132 | 9년 전 | 586 | ||
| 8131 | 9년 전 | 942 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기