求指点下淘宝登录 webbowser控件

Arz_math 2012-04-24 07:55:54
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 Taobao
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
Taowb.Url=new Uri("http://login.taobao.com/member/login.jhtml?redirect_url=http%3A%2F%2Ftaojinbi.taobao.com%2Fhome%2Faward_exchange_home.htm");
Taowb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Taowb_login);
}

private void Taowb_login(object sender, EventArgs e)

{
HtmlElement username = Taowb.Document.GetElementById("TPL_username_1");
HtmlElement password = Taowb.Document.GetElementById("TPL_password_1");
username.InnerText = "丝222";
password.InnerText = "1111111";
HtmlElement submit = Taowb.Document.GetElementById("submit");
submit.InvokeMember("click");
MessageBox.Show("new game");
}

}
}
...全文
78 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧