コード例 #1
0
 public HTMLSelectOption GetOptionByValue(string Value)
 {
     if (Children == null)
     {
         return(null);
     }
     foreach (DOMElement child in Children)
     {
         if (child is HTMLSelectOption)
         {
             HTMLSelectOption childOption = (HTMLSelectOption)child;
             if (childOption.Value == Value)
             {
                 return(childOption);
             }
         }
     }
     return(null);
 }
コード例 #2
0
 public HTMLSelectOption GetSelectedOption()
 {
     if (Children == null)
     {
         return(null);
     }
     foreach (DOMElement child in Children)
     {
         if (child is HTMLSelectOption)
         {
             HTMLSelectOption childOption = (HTMLSelectOption)child;
             if (childOption.Selected)
             {
                 return(childOption);
             }
         }
     }
     return(null);
 }