private void webBrowser5_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (webBrowser5.ReadyState < WebBrowserReadyState.Complete) return; HtmlElement btnSubmit = webBrowser5.Document.All["btsubmit"]; HtmlElement Date_Year = webBrowser5.Document.All["Date_Year"]; HtmlElement Date_Month = webBrowser5.Document.All["Date_Month"]; HtmlElement Date_Day = webBrowser5.Document.All["Date_Day"]; HtmlElement mycontent = webBrowser5.Document.All["mycontent"]; Date_Year.SetAttribute("value", DateTime.Now.Year.ToString()); Date_Month.SetAttribute("value", DateTime.Now.Month.ToString().PadLeft(2, '0')); Date_Day.SetAttribute("value", DateTime.Now.Day.ToString().PadLeft(2, '0')); mycontent.SetAttribute("value", tmp); btnSubmit.InvokeMember("click"); }
自訂搜尋
2009/08/07
C# 使用webBrowser控制項 操弄裡面的表單 *0*
訂閱:
張貼留言 (Atom)
讀取中…
沒有留言:
張貼留言