标签:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace openUrl { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void toolStripButton1_Click(object sender, EventArgs e) { string add = ""; if (!(txtUrl.Text.Trim().StartsWith("http://"))) { add = "http://" + txtUrl.Text.Trim(); txtUrl.Text = add; } webBrowser1.Url = new Uri(add); } } }
标签:
原文地址:http://blog.csdn.net/lucky51222/article/details/44248989