ListItem.toString

Syntax

toString();

Description

The toString method returns the content of the ListItem component as a string.

Example

To execute the example, create a list that consists of three items as shown on the ListItem Constructor page. The third list component is invisible (ListItem.Visibility). Create the button on pressing which the content of the list third string is displayed.

<button onclick="alert(listitem2.toString())">ShowContent</button>

After executing the example on pressing the button the string with the content of the list element named listitem2 is displayed.

See also:

ListItem