以下语句,解释清楚了80分
function TestMultipleCheckBox()
{
//uncheck all other element if "nos" is selected
var Element = WFDoc.Form.MultipleCheckBoxOS;
var found = false;
for(i=0;(typeof(Element[i])=="object") && !found;i++)
{if (Element[i].checked){found = (Element[i].value=="nos")}};
if(found)
{
// uncheck evertything but nos
for(i=0;typeof(Element[i])=="object";i++)
{if (Element[i].value!="nos"){Element[i].checked=false}}
};
}
function AddDocument()
{
// Get Formname
var FormName = LWFUtilGetSelected( 0, WFDoc.Form.AvailableAddFormsOS);
var ErrorText = "";
if (FormName.value == ""){ErrorText = ErrorText +LWFText["SelectForm"]};
if (ErrorText !=""){
alert(ErrorText)
}else{
// reset Formname
WFDoc.Form.AvailableAddFormsOS.value = "";
// Add document
LWFBinderAddDocument("",FormName.value, "", "");
}
}