自己的网页嵌入外部邮箱登陆

类似上面的外部邮箱入口,我们在自己的页面里也可以添加,代码如下

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<script language="javascript" type="text/javascript">
function clickMail()
{var gm=document.gomail
var vDomain=gm.domainss
var vName=gm.uName
var vPw=gm.uPw
if(vDomain.value==""){alert("您没有选择邮箱!")
vDomain.focus()
return false}
if(vName.value==""){alert("用户名不能为空!")
vName.focus()
return false
}
if(vPw.value==""){alert("密码不能为空!")
vPw.focus()
return false}
switch(vDomain.value){
case "163":
gm.action="http://reg.163.com/CheckUser.jsp"
gm.url.value="http://fm163.163.com/coremail/fcg/ntesdoor2?lightweight=1&verifycookie=1&style=15"
gm.username.value=vName.value
gm.password.value=vPw.value
gm.enterVip.value=''
break
case "126":
gm.action="https://reg.163.com/logins.jsp"
gm.domain.value="126.com"
gm.username.value=vName.value +"@126.com"
gm.password.value=vPw.value
gm.url.value="http://entry.mail.126.com/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26";
break
case "yeah":
gm.action="https://reg.163.com/logins.jsp"
gm.domain.value="yeah.net";
gm.username.value=vName.value +"@yeah.net"
gm.password.value=vPw.value
gm.url.value="http://entry.mail.yeah.net/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26style%3D-1";
break
case "188":
gm.action="http://reg.mail.188.com/servlet/coremail/login?style=1"
gm.user.value=vName.value
gm.pass.value=vPw.value
break
case "sohu":
gm.action="http://passport.sohu.com/login.jsp"
gm.url.value=""
gm.UserName.value=vName.value
gm.Password.value=vPw.value
gm.id.value=vName.value
gm.username.value=vName.value
gm.password.value=vPw.value
gm.m.value=vName.value
gm.passwd.value=vPw.value
gm.mpass.value=vPw.value
gm.loginid.value=vName.value+"@sohu.com"
gm.fl.value="1"
gm.vr.value="1|1"
gm.appid.value="1000"
gm.ru.value="http://login.mail.sohu.com/servlet/LoginServlet"
gm.eru.value="http://login.mail.sohu.com/login.jsp"
gm.ct.value="1173080990"
gm.sg.value="5082635c77272088ae7241ccdf7cf062"
break
case "yahoo":
gm.action="https://edit.bjs.yahoo.com/config/login"
gm.login.value=vName.value
gm.passwd.value=vPw.value
break
case "yahoocn":
gm.action="https://edit.bjs.yahoo.com/config/login"
gm.login.value=vName.value+"@yahoo.cn"
gm.passwd.value=vPw.value
break
case "tom":
gm.action="http://bjweb.163.net/cgi/163/login_pro.cgi"
gm.user.value=vName.value
gm.pass.value=vPw.value
break
case "21cn":
gm.action="http://passport.21cn.com/maillogin.jsp"
gm.LoginName.value=vName.value
gm.passwd.value=vPw.value
gm.domainname.value="21cn.com"
gm.UserName.value=vName.value+'@21cn.com'
break
case "sina":
gm.action="http://mail.sina.com.cn/cgi-bin/login.cgi"
gm.u.value=vName.value
gm.psw.value=vPw.value
break
case "gmail":
gm.action="https://www.google.com/accounts/ServiceLoginAuth"
gm.Email.value=vName.value
gm.Passwd.value=vPw.value
break
case "chinaren":
gm.action="http://passport.sohu.com/login.jsp"
gm.loginid.value=vName.value+"@chinaren.com"
gm.passwd.value=vPw.value
gm.fl.value="1"
gm.vr.value="1|1"
gm.appid.value="1005"
gm.ru.value="http://profile.chinaren.com/urs/setcookie.jsp?burl=http://alumni.chinaren.com/"
gm.ct.value="1174378209"
gm.sg.value="84ff7b2e1d8f3dc46c6d17bb83fe72bd"
break
case "tianya":
gm.action="http://www.tianya.cn/user/loginsubmit.asp"
gm.vwriter.value=vName.value
gm.vpassword.value=vPw.value
break
case "baidu":
gm.action="http://passport.baidu.com/?login"
gm.u.value="http://passport.baidu.com/center"
gm.username.value=vName.value
gm.password.value=vPw.value
break
case "xiaonei":
gm.action="http://login.xiaonei.com/Login.do"
gm.email.value=vName.value
gm.password.value=vPw.value
break
case "51com":
gm.action="http://passport.51.com/login.5p"
gm.passport_51_user.value=vName.value
gm.passport_51_password.value=vPw.value
gm.gourl.value="http%3A%2F%2Fmy.51.com%2Fwebim%2Findex.php"
break
}
vPw.value=""
return true}

</script>
<SCRIPT language=JavaScript src="http://www.hao123.com/js/sendmail.js?v=1.0" type=text/javascript defer></SCRIPT>

<FORM name=gomail onSubmit="return clickMail()" action="" method=post id=FrLgn><INPUT type=hidden name=url><INPUT type=hidden name=username><INPUT

type=hidden name=type><INPUT type=hidden name=password><INPUT type=hidden name=domain><input name=.intl value=cn type=hidden><input value=ym name=.src

type=hidden><INPUT type=hidden name=user><INPUT type=hidden name=pass><INPUT type=hidden value=true name=enterVip><INPUT type=hidden name=UserName><INPUT

type=hidden name=Password><INPUT type=hidden name=u><INPUT type=hidden name=psw><INPUT type=hidden name=login><INPUT type=hidden name=LoginName><INPUT

type=hidden name=usr><INPUT type=hidden name=func><INPUT type=hidden name=login_name><INPUT type=hidden name=login_password><INPUT type=hidden

name=BackURL><INPUT type=hidden value=http://mail.google.com/mail?ui=html&;zy=l name=continue><INPUT type=hidden name=Email><INPUT type=hidden

name=domainname><INPUT type=hidden value=false name=firstlogin><INPUT type=hidden name=starttime><INPUT type=hidden name=p2><INPUT type=hidden

name=passwd><INPUT type=hidden name=id><INPUT type=hidden name=m><INPUT type=hidden name=mpass><INPUT type=hidden name=loginid><INPUT type=hidden

name=appid><INPUT type=hidden name=ru><INPUT type=hidden name=eru><INPUT type=hidden name=fl><INPUT type=hidden name=ct><INPUT type=hidden name=vr><INPUT

type=hidden name=sg><INPUT type=hidden name=vwriter><INPUT type=hidden name=email><INPUT type=hidden name=passport_51_user><INPUT type=hidden

name=passport_51_password><INPUT type=hidden name=gourl><INPUT type=hidden name=Passwd><INPUT type=hidden name=vpassword>用户名:<input tabIndex=1 size=15

name=uName> 邮箱:<select tabIndex=2 size=1 name=domainss><option selected >请选择邮箱</option><option value=163>@163.com 网易</option><option

value=126>@126.com 网易</option><option value=sina>@sina.com 新浪</option><option value=yahoo>@yahoo.com.cn</option><option

value=yahoocn>@yahoo.cn</option><option value=gmail>@gmail.com</option><option value=sohu>@sohu.com 搜狐</option><option value=tom>@tom.com</option><option

value=188>@188.com</option><option value=21cn>@21cn.com</option><option value=yeah>@yeah.net</option><option>-请选择其他服务-</option><option value=baidu>百

度账号</option><option value=chinaren>ChinaRen校友录</option><option value=xiaonei>校内网</option><option value=51com>51.com</option></select> 密码:<input

tabIndex=3 type=password size=12 name=uPw> <input   tabIndex=4 type=submit value=" 登录 " name=sub style="height:1.67em;width:5.0em;font-size:13px"><INPUT

type=hidden value=submit name=cmd>      </form>
</body>
</html>

在动态页面中使用的时候,我们可以把上面的代码放到静态页面中,然后在动态页面中使用iframe框架调用,这样看起来很清晰,但是现在网易的好像限制的比较严了,登录后直接提示来自不安全的网站...这个目前还没找到解决的办法...

posted @ 2011-03-02 22:07  双魂人生  阅读(3144)  评论(2编辑  收藏  举报