「[javascript] dom」の編集履歴(バックアップ)一覧はこちら
「[javascript] dom」(2007/04/13 (金) 17:52:01) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
>半角>で始めると引用文になります。
-リスト
-リスト
DOM形式でテーブルを作る。
//テーブル
tbl = document.createElement( "TABLE" );
tbl.className = "table_class";
$('test').appendChild(tbl);
//テーブルBody
tbd = document.createElement( "TBODY" );
tbl.appendChild(tbd);
//行追加
row = document.createElement("TR");
tbd.appendChild(row);
//セル追加
cell = document.createElement("TD");
row.appendChild(cell);
//イメージ追加
imgobj = document.createElement( "IMG" );
imgobj.setAttribute("border","0");
imgobj.setAttribute("src","./images/error.gif");
cell.appendChild( imgobj );
//テキスト追加
countx = document.createTextNode(errorCount);
cell.appendChild(countx);
DOM形式でテーブルを作る。
//テーブル
tbl = document.createElement( "TABLE" );
tbl.className = "table_class";
$('test').appendChild(tbl);
//テーブルBody
tbd = document.createElement( "TBODY" );
tbl.appendChild(tbd);
//行追加
row = document.createElement("TR");
tbd.appendChild(row);
//セル追加
cell = document.createElement("TD");
row.appendChild(cell);
//イメージ追加
imgobj = document.createElement( "IMG" );
imgobj.setAttribute("border","0");
imgobj.setAttribute("src","./images/error.gif");
cell.appendChild( imgobj );
//テキスト追加
countx = document.createTextNode(errorCount);
cell.appendChild(countx);