快速登陆邮箱代码

这段JavaScript代码实现了快速登录邮箱的功能,通过下拉选择邮箱服务商,输入用户名和密码,即可自动跳转到相应邮箱的登录页面。代码中包含了多个主流邮箱服务商的登录链接,并对输入进行了验证,确保了用户名和密码的正确性。

 
 <script language="JavaScript">
var tbwidth=755 //表格宽度
var bcolor="#3DB836" //背景颜色,可自定义
var fcolor="#0000FF" //字体颜色,可自定义
</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(){  
 
}

function News_Window(theURL,winName,features) {
window.open(theURL,winName,features);
}
<script language="JavaScript">
document.writeln("<TABLE width=/'" + tbwidth +"/' height=/"1/"  border=0 align=center cellPadding=0 cellSpacing=0 bordercolor=/"#111111/" style=font-size:9pt;TEXT-DECORATION:none;>");
document.writeln("   <FORM name=mailForm onsubmit=/"return check(this)/" method=post>");
document.writeln("     <TBODY>");
document.writeln("   <TR> ");
document.writeln(" <TD width=/"78%/" height=26 align=left><div align=/"center/">帐号 ");
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><br>");
document.writeln("           信箱:");
document.writeln("             <select tabindex=2 size=1 name=mailSelect>");
document.writeln("               <option selected>请选择您的邮局<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////mail.sina.com.cn//cgi-bin//login.cgi;u;psw>@sina.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////vip.sina.com//cgi-bin//login.cgi;user;pass>@vip.sina.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////bjweb.163.net//cgi//163//login_pro.cgi;user;pass>@163.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////bjweb.163.net//cgi//163//login_pro.cgi;user;pass>@Tom.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////webmail.21cn.com//NULL//NULL//NULL//NULL//NULL//SignIn.gen;LoginName;passwd;post>@21cn.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////webmail.21cn.net//nature//gb//NULL//NULL//NULL//SignIn.gen;LoginName;passwd;hidden;DomainName;21cn.net>@21cn.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////g2wm.263.net//xmweb;user;pass>@263.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////entry.126.com//cgi//login;user;pass;post>126.com</OPTION> ");
document.writeln("               <option ");
document.writeln("         value=http:////reg4.163.com//in.jsp?url=http:////reg4.163.com//EnterEmail.jsp?username=window.document.mailForm.name.value;username;password;post>@163.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////vip.163.com//payment//VipLogon.jsp;username;password;post>@vip.163.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////web.netease.com//cgi//login;user;pass;post>@netease.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////web.yeah.net//cgi//login;user;pass;post>@Yeah.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////freemail.china.com//extend//gb//NULL//NULL//NULL//SignIn.gen;LoginName;passwd;post>@mail.china.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////paymail.china.com//extend//gb//NULL//NULL//NULL//SignIn.gen;LoginName;passwd;post>@china.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////login.mail.sohu.com//chkpwd.php;UserName;Password;post>@sohu.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////www.citiz.net//login.jsp.jsp;username;password;post>@citiz.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////login.chinaren.com//zhs//servlet//Login;username;password;post;hidden;url;http:////mail.chinaren.com>@ChinaRen.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////mw1.elong.com//cgi-bin//weblogon.cgi;username;password;post>@elong.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////login.etang.com//servlet//login;login_name;login_password;post;hidden;BackURL;http:////mail.etang.com//cgi//door>@etang.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////mail.fm365.com//cgi-bin//legend//wmaila;username;password;post>@FM365.com<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////edit.bjs.yahoo.com//config//login;login;passwd;post>@yahoo.com.cn<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////mail.2911.net//cgi-bin//mail//main.pl;USERNAME;PASSWORD;post>@2911.net<//option>");
document.writeln("               <option ");
document.writeln("         value=http:////202.106.186.230//extend//newgb1//NULL//NULL//NULL//SignIn.gen;LoginName;passwd;post;hidden;DomainName;email.com.cn>@email.com.cn<//option>");
document.writeln("               <option ");
document.writeln("         value=https:////login.passport.com//ppsecure//post.srf?da=passport.com&svc=mail;login;passwd;suffix;hotmail.com>@hotmail.com<//option>");
document.writeln("               <option ");
document.writeln("         value=https:////login.passport.com//ppsecure//post.srf?da=passport.com&svc=mail;login;passwd;suffix;msn.com>@msn.com<//option>");
document.writeln("             <//select><br>");
document.writeln("           密码:");
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><br>");
document.writeln("              ");
document.writeln("             <input type=submit value=登陆  name=Submit2>");
document.writeln("          <//div><//TD>");
document.writeln("       <//TR>");
document.writeln("   <//FORM>");
document.writeln(" <//TABLE>")
</script>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值