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);
}
}
}
C#的WebBrowser控件浏览网页
最新推荐文章于 2024-06-25 00:52:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)