嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 5 元微信扫码支付:5 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
c# winform 打开网页
//System.Diagnostics.Process.Start("http://www.qq.com");
//连接
string url = "http://www.qq.com";
//定义脚本
string script = @"<script language='javascript' type='text/javascript'>
function openUrl(url){
window.open(url,'测试窗口','width=400px,height=400px,directories=true,location=false,menubar=false,resizeable=false,scrollbars=yes,toolbar=false ');
}</script>";
WebBrowser wb = new WebBrowser();
wb.DocumentText = @"<html> <head>" script "</head><body></body></html>";//定义WebBrowser中的DOM文档
wb.DocumentCompleted = delegate
{
//执行脚本函数
wb.Document.InvokeScript("openUrl", new object[] { url });
};