JavaScript with a drop

xiaoxiao2021-03-06  112

1. Judgment whether an object is defined (exist): if (HistoryArray == undefined)

2. About the creation of a Table in the HTML page, and dynamically adds the row in Table:

// Create a Table object

Var vTable = Document.createElement ("Table");

/ / Set the property of Table

VTable.SetaTRibute ("cellpadding", "1"); vtable.setttribute ("cellspacing", "1"); vtable.setttribute ("border", "0");

// Insert a line

VTR = vTable.inSertrow (Kindex);

// Insert a column

VTD = vtr.insertcell (IIndex);

// Set the column properties

VTD.Style.Background = "# 7596c6"; vtd.align = "center";

VTD.Style.Background = "# 0066cc";

// Insert HTML shown in this column

VTD.innerHtml = "

Divid.Appendchild (vTable);

=========================

There is a need to:

=================================================

The above is a method of being dynamically inserted into the Table in the HTML page.

转载请注明原文地址:https://www.9cbs.com/read-101499.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.040, SQL: 9