selectedIndex是document.form.site的當前選擇項的索引值,從0開始從上往下依次遞增,沒選中是-1
簡單的說你可以將列表框理解為一個數組,selectedIndex就是這個數組的索引值,它對應的就是列表中該位置顯示的項
eg:
if(COMBO0PC.selectedIndex!=-1){
Workitem.variables.item("BF_MAIN_NAME").value = COMBO0PC.options[COMBO0PC.selectedIndex].text;
Workitem.variables.item("BF_MAIN_TYPE").value = COMBO0PC.value;
Workitem.variables.item("BF_ACT_NAME").value = ' - ' + COMBO0PC.options[COMBO0PC.selectedIndex].text;
}