/ LJCPHPCodeDoc / LJCTextBuilderLib / LJCTextBuilder / TableAttribs


Parameters
border - The border attribute.
borderSpacing - The borderspacing attribute
cellPadding - The cellpadding attribute
className - The class attribute.
id - The id attribute.

Returns

The common table attributes.

Syntax

JavaScript
TableAttribs(border = 1, borderSpacing = 0, cellPadding = 2, className = null, id = null)

Gets common table attributes.

Example

JavaScript
// Gets common table attributes.
TableAttribs()
{
  // Root Method Begin
  let textState = new LJCTextState();

  const tb = new LJCTextBuilder(textState);

  // Example Method:
  const className = "styleClass";
  const id = "idValue";
  const border = 1; // Default
  const borderSpacing = 0; // Default
  const cellPadding = 2; // Default
  const attribs = tb.TableAttribs(border, borderSpacing, cellPadding
  , className, id);
        
  const result = tb.GetAttribs(attribs, textState);

  // result:
  // " id=\"idValue\" class=\"styleClass\""
  // " style=\"border: 1px solid; borderspacing: 0px;" // No newline
  // " cellpadding: 2px;\"" // No newline
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.