getArrayFromChoice( )
将所选选择标签或代码从多选项问题(下拉、单选按钮、复选框)转换为数组。
语法
getArrayFromChoice(variable, [option])参数
返回值
- 如果未选择任何内容,则数组为空。
 - 所选选择标签的数组。
 
示例 3-89 给定一个下拉列表(选项)控件 d2,其中选择了“是”和“否”标签
// Return the first selected label from choice item dd2:
returngetArrayFromChoice(dd2)[0];
// returns "Yes"  
// Return the second selected label from choice item dd2:
return getArrayFromChoice(dd2)[1];
// Returns "No"
// Return the first selected code from choice item dd2:
return getArrayFromChoice(dd2, "code")[0];
// returns C1父主题:多个选项问题函数