dropdown
The 'dropdown' function displays a dropdown box allowing end-users to select an item from a given list;
'dropdown'函数提供下拉选项让用户选择
- Prototype: dropdown(sDescr, vEntries);
- Parameters:
- sDescr: a descriptive text;
显示的文本 - vEntries, an Array containing items to be listed;
包含可选项的列表
- sDescr: a descriptive text;
- Return Value: index of the selected item, 0-based; or -1 on cancel.
- Example:
var iSel=dropdown('Select a color', ['red', 'green', 'blue', 'yellow']);