COMING SOON 🚀

innerHTML 오류 문의

innerHTML을 사용해서 데이터를 받을려고 하는데 입렵한 값이 출력이 되지 않습니다.
조언 부탁 드립니다.



<입력을 받는 php>
<table id="variableFiles" cellpadding=0 cellspacing=0></table>
<script language="JavaScript">
var flen = 0;
function add_pfile()
{
    var objTbl;
    var objRow;
    var objCell;
    if (document.getElementById)
objTbl = document.getElementById("variableFiles");
    else
objTbl = document.all["variableFiles"];

    objRow = objTbl.insertRow(objTbl.rows.length);
    objCell = objRow.insertCell(0);
   
            objCell.innerHTML = "<table cellpadding=0 cellspacing=0 ><tr height=25 align=center><td width=100>"+eval(flen+1)+"명</td><td width=100><input type='text' class='ed' style='width:100%;' name='rev_name[]' value=''></td><td width=160><input type='text' class='ed' size=13 maxlength=10 name='rev_birth[]'></td><td width=150><input type='text' class='ed' size=13 maxlength=13 name='rev_jumin[]'></td></tr></table>";

    flen++;
}

<?=$file_script; //수정시에 필요한 스크립트?>
function del_pfile()
{
    // file_length 이하로는 필드가 삭제되지 않아야 합니다.
    var file_length = <?=(int)$file_length?>;
    var objTbl = document.getElementById("variableFiles");
    if (objTbl.rows.length - 1 > file_length)
    {
objTbl.deleteRow(objTbl.rows.length - 1);
flen--;
    }
}
</script>


<출력을 하는 php>
<?
if($data[gubun]==2 || $data[gubun]==3){
$result2 = mysql_query("select * from reservation_new_extend where ridx = '$data[idx]' order by re_no",$dbconn);

for($i=0;$row2=mysql_fetch_array($result2);$i++){
if($i>0)echo "<br />";
echo $row2[re_name]."/".$row2[re_birth]."/".$row2[re_jumin];
}}?>
|

댓글 2개

소스를 자세히 보진 않았지만..

objCell.innerHTML = "<table cellpadding=0 cellspacing=0 > ....... </table>

에서

<table cellpadding=0 cellspacing=0 > 와 끝에 </table> 를 빼보세요.
제가 개발하면서 innerHTML 가 ie 에서 에러가 굉장히 많더라구요 ;
그래서 innerHTML는 절대 안쓰는쪽으로 하고 있습니다 ..
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
12년 전 조회 3,247
12년 전 조회 2,989
12년 전 조회 3,655
12년 전 조회 2,418
12년 전 조회 2,118
12년 전 조회 1,702
12년 전 조회 1,901
12년 전 조회 2,381
12년 전 조회 3,764
12년 전 조회 3,848
12년 전 조회 2,916
12년 전 조회 2,521
12년 전 조회 2,297
12년 전 조회 1만
12년 전 조회 1,913
12년 전 조회 2,930
12년 전 조회 2,458
12년 전 조회 2,935
12년 전 조회 3,137
12년 전 조회 2,336
12년 전 조회 2,897
12년 전 조회 3,564
12년 전 조회 2,643
12년 전 조회 2,628
12년 전 조회 2,584
12년 전 조회 8,786
12년 전 조회 2,679
12년 전 조회 2,549
12년 전 조회 3,337
12년 전 조회 2,299
12년 전 조회 2,834
12년 전 조회 2,452
12년 전 조회 2,453
12년 전 조회 4,201
12년 전 조회 1.2만
12년 전 조회 4,312
12년 전 조회 4,251
12년 전 조회 2,723
12년 전 조회 4,024
12년 전 조회 2,152
12년 전 조회 3,040
12년 전 조회 2,393
12년 전 조회 2,767
12년 전 조회 2,552
12년 전 조회 2,856
12년 전 조회 4,935
12년 전 조회 3,206
12년 전 조회 2,254
12년 전 조회 6,599
12년 전 조회 2,545
12년 전 조회 2,529
12년 전 조회 4,731
12년 전 조회 2,960
12년 전 조회 6,189
12년 전 조회 6,777
12년 전 조회 3,199
12년 전 조회 4,394
12년 전 조회 2,240
12년 전 조회 4,630
12년 전 조회 1.2만
12년 전 조회 7,041
12년 전 조회 2,294
12년 전 조회 2,046
12년 전 조회 3,277
12년 전 조회 2,786
12년 전 조회 1,767
12년 전 조회 2,603
12년 전 조회 4,112
12년 전 조회 2,103
12년 전 조회 3,619
12년 전 조회 2,499
12년 전 조회 2,042
12년 전 조회 2,724
12년 전 조회 2,156
12년 전 조회 4,484
12년 전 조회 3,168
12년 전 조회 4,176
12년 전 조회 3,047
12년 전 조회 2,359
12년 전 조회 2,858
12년 전 조회 3,999
12년 전 조회 3,817
12년 전 조회 2,265
12년 전 조회 3,361
12년 전 조회 3,068
12년 전 조회 2,050
12년 전 조회 3,330
12년 전 조회 4,995
12년 전 조회 4,282
12년 전 조회 2,745
12년 전 조회 8,988
12년 전 조회 3,751
12년 전 조회 3,999
12년 전 조회 3,085
12년 전 조회 4,755
12년 전 조회 2,647
12년 전 조회 2,397
12년 전 조회 3,018
12년 전 조회 2,596
12년 전 조회 3,282