Function AddItemToSelect(oSelAdd,sValue,sInnerText,isChecked)
Dim isExistItem
isExistItem = False
Dim i
For i = 0 To oSelAdd.options.length - 1
If oSelAdd.options(i).value = sValue Then
isExistItem = true
End If
Next
if Not isExistItem Then
Set oOption = document.createElement("OPTION")
oSelAdd.options.add(oOption)
oOption.innerText = sInnerText
oOption.value = sValue
If isChecked Then
oOption.selected = true
End If
Set oOption = Nothing
End If
End Function
</script>
<select id="aa"></select>
<script language="vbscript">
set oo = document.all("aa")
AddItemToSelect oo,"ff","fffff",false