See also: tr, th, td

Encloses the passed information in a table tag (<table></table>)

Syntax

JSV_table(tableData [, attributes])

Prototype

tableData.TABLE([attributes])

Returns

The table returns the passed information in a table tag. If no data is passed, then the table function returns an empty, single data cell table (i.e., <table><tr><td>&nbsp;</td></tr></table>).

Parameters

The table function uses the following arguments.

Argument Description
tableData The table row and table header or table data, that is to be enclosed in the table.
attributes Optional. The attributes that define various properties for the element.

Remarks

See the Web Design Group HTML 4.0 Reference on the table tag for more information.

Dependencies

JSV_isWhitespace

Example

The following lines of code

var row1 =
    JSV_td("This is cell 1".bold()) + 
    JSV_td("This is cell 2".bold());
var row2 =
    JSV_td("This is cell 1") + 
    JSV_td("This is cell 2");
document.write( JSV_table( JSV_tr(row1, 'BGCOLOR="#00FFFF"') +
    JSV_tr(row2), 'BORDER="1" CELLSPACING="1" CELLPADDING="1"' ) );

produce