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); } } }
版权声明:本文博主原创文章。博客,未经同意,不得转载。
本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/4757804.html,如需转载请自行联系原作者