[code=csharp]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 WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
#region
HtmlElement queren = webBrowser1.Document.All["loginBtn"];
HtmlElement yonghuming = webBrowser1.Document.All["txtUserName"];
HtmlElement mima = webBrowser1.Document.All["txtPassword"];
if (yonghuming == null || mima == null || queren == null)
return;
yonghuming.SetAttribute("value", "15917192524");
mima.SetAttribute("value", "ok15917192524");
queren.InvokeMember("click");
#endregion
}
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
webBrowser1.Navigate("http://mail.10086.cn/");
}
}
}
自动填表单好后点登录弹出个安全警报即将重定向到不安全的连接,要点击该如何操作,查看不到网页源文件C#浏览器
[code=csharp]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 WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
#region
HtmlElement queren = webBrowser1.Document.All["loginBtn"];
HtmlElement yonghuming = webBrowser1.Document.All["txtUserName"];
HtmlElement mima = webBrowser1.Document.All["txtPassword"];
if (yonghuming == null || mima == null || queren == null)
return;
yonghuming.SetAttribute("value", "15917192524");
mima.SetAttribute("value", "ok15917192524");
queren.InvokeMember("click");
#endregion
}
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
webBrowser1.Navigate("http://mail.10086.cn/");
}
}
}
自动填表单好后点登录弹出个安全警报即将重定向到不安全的连接,要点击该如何操作,查看不到网页源文件C#浏览器
解决方案 »
- 现在的磅称要怎么读取数据?难道还是串口的?
- 无法加载 DLL“ftpdll.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
- 调用C++写的DLL函数
- ADO.NET中DataGrid通过键盘DEL键删除的问题,懂得来啊~~~~
- 请问如何将在 DataGrid 一栏里的ComboBox改为可以让使用者自行输入值进入,散分 100 分,以作答谢!
- 急求《C# 高级编程》(<Professional C#>)的代码?
- 各位大虾:安装了mdac后在注册表的什么地方体现出来的?
- .net了,com还有用吗?
- 如何将dataset中表的字段值赋给一个文本框?来者有分!
- 如何在程序中自定义realPlay的鼠标右键菜单
- c#请教 怎样才能让角色移动到鼠标的位置而不是闪过去
- c#winform打包是的出现的问题
WebBrowser就是一个小型的IE,你看看控件里有没有相关的属性可以处理它