|
楼主 |
发表于 2013-8-20 10:26:04
|
显示全部楼层
我按你说的做了,可是只有www.baidu.com啊- private void Form1_Load(object sender, EventArgs e)
- {
- // this.textAddr.Text = "http://ac.pagechoice.net/dap/var/templates_compiled/preview.html";
- CBUrl.Items.Add("http://gb.cri.cn/42071/2013/08/06/6651s4208724.htm");
- CBUrl.Items.Add("http://gb.cri.cn/gg/news2013/news_ybl2013_r_ba01.htm");
- CBUrl.Items.Add("http://www.quanjing.com/");
- CBUrl.Items.Add("http://www.baidu.com");
- webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_Completed);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string strUrl2 = CBUrl.SelectedItem.ToString().Trim();
- webBrowser1.Navigate(strUrl2);
- }
- private void webBrowser1_Completed(object sender, WebBrowserDocumentCompletedEventArgs e)
- {
- textBox1.Text += e.Url.ToString();
- }
复制代码 |
|