director.js 222222222222222222222222
方法/步驟
var table = S("directorDiv").getElementsByTagName("TABLE")[0];
//獲取後臺資料庫資料
var directors = getDirectors();
//沒有資料的情況
if(directors == null directors.length < 1){
for(var i=0;i<5;i++){
var tr = document.createElement("TR");
tr.className = "director_tr";
var img = document.createElement("TD");
img.className = "director_td" + 2;
img.innerHTML = "";
tr.appendChild(img);
for(var j= 0;j<4;j++){
var td = document.createElement("TD");
td.className = "director_td2";
tr.appendChild(td);
}
table.appendChild(tr);
}
return;
}
//操作按鈕
var showMore = document.createElement("TD");
showMore.className = "director_td2";
showMore.innerHTML =" " + ""
+ " " + "";
tr.appendChild(showMore);
tr2.appendChild(td2);
table.appendChild(tr);
table.appendChild(tr2);