$gs()

Syntax

styles = $gs(ELEMENT as element/string/array of ELEMENTs)

Arguments

ELEMENTDOM ElementstringDOM Element Array

The element(s) with the in-line style information to retrieve. Can be a single DOM element, an element ID specified as a string, or an array of DOM Element objects. If specifying the ID as a string, the ID corresponds to the value for the id HTML attribute for the element you wish to assign a style.

Returns

stylesString Arrayboolean

Returns the in-line styles assigned to the style property for the element(s) as an array of string. If no styles exist, the array will be empty. If any of the specified element(s) do not exist, $gs() will return false or throw an error.

Description

The $gs() function gets the in-line style of the passed-in element(s), and returns the CSS text.

Example

alert($gs('fname'));
 
/*The above example would return a string that might look like this:
font-family: arial;
font-size: 10pt;
*/
Use {dialog.object}.getPointer() to get the DOM element for a control.

See Also