.net 像hao123的快捷邮箱登陆的实现代码
程序员文章站
2024-03-08 17:47:52
复制代码 代码如下:<%@ page language="c#" autoeventwireup="true" codefile="default2.aspx.cs"...
复制代码 代码如下:
<%@ page language="c#" autoeventwireup="true" codefile="default2.aspx.cs" inherits="default2" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<script language="javascript">
<!--
function log_submit(){
var user = document.mailform.mail_name.value;
var prono = document.mailform.mailselect.value;
var mail_action = prono.split(";");
if(mail_action.length > 1)
{
if(mail_action[1]=="suffix")
user += "@"+mail_action[2];
else
eval("document.mailform."+mail_action[1]+".value = '"+mail_action[2]+"';");
}
var passwd = document.mailform.mail_password.value;
var formobj = document.mailform;
function checkuserpass(){
if (user == ""){
alert("请填写用户名");
document.mailform.mail_name.focus();
return false;
}
else if (passwd == ""){
alert("请填写密码");
document.mailform.mail_password.focus();
return false;
}
else {
return true;
}
}
if (checkuserpass()){
document.mailform.action = mail_action[0];
document.mailform.u.value = user;
document.mailform.user.value = user;
document.mailform.loginname.value = user;
document.mailform.username.value = user;
document.mailform.username.value = user;
document.mailform.login_name.value = user;
document.mailform.login.value = user;
document.mailform.psw.value = passwd;
document.mailform.pass.value = passwd;
document.mailform.passwd.value = passwd;
document.mailform.password.value = passwd;
document.mailform.password.value = passwd;
document.mailform.login_password.value = passwd;
document.mailform.submit();
document.mailform.mail_password.value = "";
}
return false;
}
//-->
</script> <form method="post" target="_blank" name="mailform" onsubmit='return log_submit();'>
<table cellspacing="0" align="left" style="border:1px solid #c0c0c0;font-size:13px">
<tr style="color:#ffffff;background:#336699;"><td align="left">常用邮箱快速登录</td><td align="right"></td></tr>
<tr height=22>
<input type="hidden" name="u" value="">
<input type="hidden" name="user" value="">
<input type="hidden" name="loginname" value="">
<input type="hidden" name="username" value="">
<input type="hidden" name="username" value="">
<input type="hidden" name="login_name" value="">
<input type="hidden" name="login" value="">
<input type="hidden" name="psw" value="">
<input type="hidden" name="language" value="">
<input type="hidden" name="pass" value="">
<input type="hidden" name="passwd" value="">
<input type="hidden" name="password" value="">
<input type="hidden" name="password" value="">
<input type="hidden" name="login_password" value="">
<input type="hidden" name="url" value="">
<input type="hidden" name="backurl" value="">
<td colspan="2"><select name="mailselect" size="1">
<option selected>选择您的邮局</option>
<option value="http://mail.sina.com.cn/cgi-bin/login.cgi">@sina.com</option>
<option value="http://reg.163.com/in.jsp?url=http://fm163.163.com/coremail/fcg/ntesdoor2?username=wd.dm.mailform.name.value">@163.com</option>
<option value="http://login.mail.sohu.com/chkpwd.php">@sohu.com</option>
<option value="http://login.chinaren.com/zhs/servlet/login;url;http:/mail.chinaren.com">@chinaren.com</option>
<option value="http://bjweb.163.net/cgi/163/login_pro.cgi">@163.net</option>
<option value="http://bjweb.mail.tom.com/cgi/163/login_pro.cgi">@tom.com</option>
<option value="http://webmail.21cn.com/null/null/null/null/null/signin.gen">@21cn.com</option>
<option value="https://edit.bjs.yahoo.com/config/login">@yahoo.com.cn</option>
<option value="http://entry.126.com/cgi/login">@126.com</option>
<option value="http://g2wm.263.net/xmweb">@263.net</option>
<option value="http://freemail.eyou.com/cgi-bin/login">@eyou.com</option>
<option value="http://vip.sina.com/cgi-bin/login.cgi">@vip.sina.com</option>
<option value="http://vip.163.com/payment/viplogon.jsp">@vip.163.com</option>
<option value="http://paymail.china.com/extend/gb/null/null/null/signin.gen">@china.com</option>
<option value="http://mw1.elong.com/cgi-bin/weblogon.cgi">@elong.com</option>
<option value="http://login.etang.com/servlet/login;backurl;http:/mail.etang.com/cgi/door">@etang.com</option>
<option value="http://www.citiz.net/login.jsp">@citiz.net</option>
<option value="http://202.106.186.230/extend/newgb1/null/null/null/signin.gen">@email.com.cn</option>
</select>
<input type="submit" value="登录" style="background-color:#ffd700">
</td></tr>
<tr><td height=22 colspan=2>用 户 名:<input name="mail_name" onfocus="this.select" size=12></td></tr>
<tr><td colspan=2>登录密码:<input name="mail_password" onfocus="this.select" type="password" size=12></td></tr>
</table></form>
</body>
</html>