addOptionTag

addOptionTag(opt:      String;
             selected: Boolean): String;

The addOptionTag method of the JadeHTMLClass class returns the HTML representing an option tag for a <select> tag. No validation is done to ensure that the <select> tag already exists. The parameters for the addOptionTag method are listed in the following table.

Parameter Description
opt String to be added to the <select> tag
selected Set to true when this entry is the selected entry

The code fragment in the following example shows the use of the addOptionTag method.

addOptionTag("Denniston", true);

This example returns the following.

<option selected>Denniston </option>