HTMLSelectElement获取选项的信息

HTMLSelectElement   selectE   =   (HTMLSelectElement)doc.getElementById( "test ");
IHTMLElementCollection   options   =   selectE.children   as   IHTMLElementCollection;
foreach   (HTMLOptionElementClass   option   in   options)
{
        MessageBox.Show(string.Format( "{0}   =   {1} ",   option.text,   option.value));
}

posted @ 2010-01-10 15:35  真功夫  阅读(1441)  评论(0编辑  收藏  举报