日期:2014-05-17  浏览次数:21045 次

webbrowser 如何执行带参数的JS函数?
模拟执行下面这个JS,selectSaCode(this)无效呢 
<TD class=recordContent>&nbsp;<SELECT onchange=selectSaCode(this) name=saCode> <OPTION selected value=default>请选择</OPTION> <OPTION value=f650001>f650001</OPTION></SELECT> </TD>



  
 public override bool webLogin(IHTMLDocument2 htmlElement)
        {
 all = htmlElement.all;
                            HTMLSelectElement daili = null; ;
                            foreach (IHTMLElement e in all)
                            {
 if (e is HTMLSelectElementClass)
                                    {
                                       daili = (HTMLSelectElement)e;
                                       if (daili.outerHTML.IndexOf("selectSaCode(this)") > 0)
                                        daili.selectedIndex = 2;
                                    }
                                    else if (e is HTMLOptionElementClass)
                                    {