大向微博客-長大樂忧伤

当前位置:网站首页 / 网站源码 / 正文

仿HAO123的邮箱登录

</script>
<script src="mail.min.js" type="text/javascript"></script>
<form id="mailForm" method=post>
<span style="float:left" id="date_now"></span>
<span style="padding-left:20px;">
邮箱用户:<input type="text" style="width:120px;" id="mailUserName" />
密码:<input style="width:100px;" id="mailPassword" type="password" />
<select name="mailSelect" class="h" id="mailSelect" style="BORDER-RIGHT: #ffffff 0px groove; BORDER-TOP: #ffffff 0px groove; FONT-SIZE: 12px; BORDER-LEFT: #ffffff 0px groove; BORDER-BOTTOM: #333333 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff">
<select>
<span id="mailParas" style="display:none;"></span>
<input id="btnMailLogin" type="submit" value="登录"/>
</span>
</form>

  

javascript:

var mail = {
mailData:[
{
mail: "163",
name: "@163.com",
params: {
username: "_username_",
password: "_password_"
}
},
{
mail: "126",
name: "@126.com",
params: {
domain: "126.com",
username: "_username_@126.com",
password: "_password_",
}
},
{
mail: "sina",
name: "@sina.com",
params: {
u: "_username_",
psw: "_password_"
}
},
{
mail: "yahoocomcn",
name: "@yahoo.com.cn",
params: {
login: "_username_@yahoo.com.cn",
passwd: "_password_",
domainss: "yahoo",
".intl": "cn",
".src": "ym"
}
},
{
mail: "yahoocn",
name: "@yahoo.cn",
params: {
login: "_username_@yahoo.cn",
passwd: "_password_",
domainss: "yahoocn",
".intl": "cn",
}
},
{
mail: "sohu",
name: "@sohu.com",
params: {
loginid: "_username_@sohu.com",
passwd: "_password_",
fl: "1",
vr: "1|1",
appid: "1000",
ct: "1173080990",
sg: "5082635c77272088ae7241ccdf7cf062"
}
},
{
mail: "yeah",
name: "@yeah.net",
params: {
domain: "yeah.net",
username: "_username_@yeah.net",
password: "_password_",
}
},
{
mail: "139",
name: "@139.com",
params: {
UserName: "_username_",
Password: "_password_",
clientid: "5015"
}
},
{
mail: "tom",
name: "@tom.com",
params: {
user: "_username_",
pass: "_password_"
}
},
{
mail: "21cn",
name: "@21cn.com",
params: {
UserName: "_username_@21cn.com",
passwd: "_password_",
domainname: "21cn.com"
}
},
{
mail: "renren",
name: "u4ebau4ebau7f51",
params: {
email: "_username_",
password: "_password_",
domain: "renren.com"
}
},
{
mail: "baidu",
name: "u767bu5f55u767eu5ea6",
params: {
username: "_username_",
password: "_password_"
}
},
{
mail: "51",
name: "51.com",
params: {
passport_51_user: "_username_",
passport_51_password: "_password_",
gourl: "http%3A%2F%2Fmy.51.com%2Fwebim%2Findex.php"
}
}],
init:function(){
var $mailSelect = $('#mailSelect');
var $mailUserName =$('#mailUserName');
var $mailPassword = $('#mailPassword');
var $mailParas = $('#mailParas');
var md = mail.mailData;
var p=[];
$mailSelect.empty(); //清空邮箱列表
for(var i=0;i<md.length;i++){
$mailSelect.append('<option value="'+md[i].mail+'">'+md[i].name+'</option>');
}
$mailSelect.change(function(){
var mailName = $(this).val();
var m = mail.find(mailName,md);
if(m){
p = [];
for(var key in m.params){
p.push('<input type="hidden" name="'+ key+'" value="'+m.params[key].replace(/_username_/,$mailUserName.val()).replace(/_password_/,$mailPassword.val())+'" />');
};
$mailParas.empty().html(p.join(''));
$('#mailForm').attr('action',m.action);
}
}).change();
$('#mailForm').bind('submit',function(){
return mail.check();
});
},
check:function(){
var $mailSelect = $('#mailSelect');
var $mailUserName =$('#mailUserName');
var $mailPassword = $('#mailPassword');
if($mailUserName.val()==''){
alert('请输入您的邮箱登录名称!');
return false;
}else if($mailPassword.val()==''){
alert('请输入您的登录密码!');
return false;
}else{
$mailSelect.change();
$mailPassword.val('');
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: 14px; color: #FF0000">正在登录系统,请稍候......</p><form name="tmpForm" action="'+$('#mailForm').attr('action')+'" method="post">'+$('#mailParas').html()+'</form></body></html>');
doc.close();
return false;
}
},
find:function(mail,md){ //根据mail名称查找
for(var i=0;i<md.length;i++){
if(md[i].mail == mail)
return md[i];
}
}
}
$(function(){
mail.init();
})

推荐阅读

文章标签: 仿HAO123的邮箱登录

版权声明: 本站所有主题由该文章作者发表,该文章作者与長大樂忧伤享有文章相关版权。
本帖可能有部分转自其它媒体,并不代表本站赞同其观点和对其真实性负责,如有侵犯,请告知,将及时予与删除并致歉。

本文链接: http://www.ibolg.net/yuanma/HAO123.html,尊重共享,欢迎转载!

分享本文:

QR:  仿HAO123的邮箱登录
呃 本文暂时没人评论 来添加一个吧

发表评论

必填

选填

选填

必填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

分享:

支付宝

每日领红包