新手 求大神帮忙~~!!!
winform 窗体中有 webBrowser1 textbox1和textbox2 以及1个【输入】button如何实现 点击button 【输入】按钮则把textbox1的第一行信息输入到 【用户名】中;textbox2的第一行信息输入到【密码】中;
在点击【输入】按钮 则把textbox1的第二行信息输入到 【用户名】中;textbox2的第二行信息输入到【密码】中;
... --------------------编程问答-------------------- 判断textbox1.text为不为空,如果不为空,给值给textbox2,如果为空,给值给textbox1 --------------------编程问答-------------------- view plaincopy to clipboardprint:
private void button1_Click( object sender, EventArgs e )
{
System.Windows.Forms.HtmlDocument document =this.webBrowser1.Document;
if ( document == null )
{
return;
}
document.All["logname"].SetAttribute( "Value", "用户名" ); //用户名
document.All["originalLogpasswd"].SetAttribute( "Value", "密码" ); //密码
document.All["dologin"].InvokeMember( "click" ); //登录按钮的click方法
}
private void button1_Click( object sender, EventArgs e )
{
System.Windows.Forms.HtmlDocument document =this.webBrowser1.Document;
if ( document == null )
{
return;
}
document.All["logname"].SetAttribute( "Value", "用户名" ); //用户名
document.All["originalLogpasswd"].SetAttribute( "Value", "密码" ); //密码
document.All["dologin"].InvokeMember( "click" ); 、、按钮的click
}
补充:.NET技术 , C#