Insert Table
function attr(name, value) {
if (!value || value == "") return "";
return ' ' + name + '="' + value + '"';
}
function explore(obj, pnt) {
var i;
for (i in obj) {
alert(i +"="+obj[i]);
}
}
function insertTable() {
// use DOM functions to create the table in the dlg_ins_table window
// and then return the innerHTML of the DIV containing the table
var nRows = rows.value ? parseInt(rows.value) : 2;
var nCols = cols.value ? parseInt(cols.value) : 2;
// create the div that will contain the table
var d = document.body.appendChild( document.createElement("DIV") );
// create the table in the div
var t = d.appendChild( document.createElement("TABLE") );
var tb = t.appendChild( document.createElement("TBODY") );
for (var i = 0; i < nRows; i++) {
var tr = tb.appendChild( document.createElement("TR") );
for (var j = 0; j < nCols; j++) {
var td = tr.appendChild( document.createElement("TD") );
td.style.height = rowHeight.value;
td.style.width = colWidth.value;
}
}
// set table properties
t.border = borderWidth.value;
t.bordercolor = borderColor.value;
t.cellspacing = cellSpacing.value;
t.cellpadding = cellPadding.value;
t.bgcolor = backgroundColor.value;
window.returnValue = d.innerHTML;
window.close();
}
function cancel() {
window.returnValue = null;
window.close();
}
Layout
Rows:
Cell Padding:
Cols:
Cell Spacing:
Rows Height:
Column Width:
Borders
Width:
Color:
Background
Color:
Wyszukiwarka
Podobne podstrony:
dlg ins imagepopup ins tabledlg ins smiledlg ins smiledlg ins charlanai dinning tableThe Complete Pentium Instruction Set Table (32 Bit Addressing Mode Only)Ins?deles05 ins tab20 tell meinsert table buttoncurio tabletiled coffee tablewięcej podobnych podstron