怎样让登录邮箱是在当前窗口打开?我这里有一段登录邮箱的代码,谢谢

benbenRH 2009-07-31 11:01:44
<html>
<head>
<title>自动登陆</title>
</head>
<body >


</form>
<div style="text-align: right">






<TABLE style="WIDTH: 250px; height=300 HEIGHT: 1px; border-right: #DDDDDD 1px solid; border-top: #DDDDDD 1px solid; border-left: #DDDDDD 1px solid; border-bottom: #DDDDDD 1px solid" height=1 cellSpacing=0 cellPadding=0 background=#f6f6f6 valign="Top" >
<TBODY border=0 >

<SCRIPT language=JavaScript><!--
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
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; /*合并字符串,得到形如“http://mail.sina.com.cn/cgi-bin/log...”的字符串型URL*/
}
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]+'">'
if(arrayInfo[4]=='hidden') strUrl+='<input type="hidden" name="'+arrayInfo[5]+'" value="'+arrayInfo[6]+'">'
if(arrayInfo[4]=='func') strUrl+='<input type="hidden" name="func" value="'+arrayInfo[5]+'">';
strUrl+='</form>';
}
return strUrl;
}

function go(){
var strLocation=makeURL();
if(strLocation.indexOf('<form name="tmpForm"')!=-1){/*对于只能用“post”来获取表单数据的邮箱使用自动提交的临时表单*/
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">正在登陆,请稍候......</p>'+strLocation+'</body></html>');
doc.close();
}
else window.open(strLocation,'','scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes');
}

function ClearPass(){
document.mailForm.password.value="";
}

function News_Window(theURL,winName,features) {
window.open(theURL,winName,features);
}

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
}
function rand(number) {
return Math.ceil(rnd()*number);
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
"; path=/" +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function chkinput(f){
var tmp = f.name.value;
if(!tmp) {
alert("请填写您要查询的内容!");
return false;}
var tmp2 = f.tiaojian.value;
if(!tmp2) {
alert("请选择您要查询的条件!");
return false;}
return true;}
function chkinput2(f){
var tmp = f.user.value;
if(!tmp) {
alert("帐号不能为空!");
return false;}
var tmp2 = f.pass.value;
if(!tmp2) {
alert("密码不能为空!");
return false;}
var tmp3 = f.site.value;
if(!tmp3) {
alert("您没有选择信箱!");
return false;}
return true;}
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}

function clearpass(){
document.loginmail.pass.value="";
}

function amt(){
var count = GetCookie('addhaozsfav');
if(count == null) {
var exp = new Date();
exp.setTime(exp.getTime() + (1*24*60*60*1000));
SetCookie('addhaozsfav','newfav',exp,null,'haozs.com');
return 1;
} else {
return 0;
}
}

function ihp(){
var ishome = GetCookie('ishaozshome');
if (ishome == null) {
var ishomeExp = new Date();
ishomeExp.setTime(ishomeExp.getTime() + (1*24*60*60*1000));
SetCookie('ishaozshome','newhome',ishomeExp);
return 1;
} else {
return 0;
}
}

function tbwin(){
var ishome = GetCookie('tbwin');
if (ishome == null) {
var ishomeExp = new Date();
ishomeExp.setTime(ishomeExp.getTime() + (1*60*60*1000));
SetCookie('tbwin','popuped',ishomeExp);
return 1;
} else {
return 0;
}
}

function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}


// --></SCRIPT>
















<BASE target=_top>


<TR>


<FORM name=mailForm onsubmit="return check(this)" method=post>

<TD class=f1 height=250 border=0 bgColor=#f6f6f6>


<span style="font-size: 16pt; font-family: 微软雅黑" ; text-align:left>  邮箱登陆</span>
<BR>
</BR>
<TABLE cellSpacing=0 cellPadding=0 width=210 height=150 bgColor=#f6f6f6 border=0 ALIGN=CENTER>
<TBODY>

<TR>

<TD colSpan=2 height=23><font face="宋体" size="2" color=#000000>用户昵称 </font><INPUT style="FONT-SIZE: 12px" onfocus=this.select() tabIndex=1 size=23 name=name> </TD></TR>
<TR align=right>
<TD height=23><SELECT tabIndex=2 size=1 name=mailSelect> <OPTION value="" selected>请选择信箱</OPTION> <OPTION value=http://mail.sina.com.cn/cgi-bin/login.cgi;u;psw>新浪sina.com</OPTION> <OPTION value=http://vip.sina.com/cgi-bin/login.cgi;user;pass>vip.sina.com</OPTION> <OPTION value=http://bjweb.163.net/cgi/163/login_pro.cgi;user;pass>163.net</OPTION> <OPTION value=http://bjweb.163.net/cgi/163/login_pro.cgi;user;pass>Tom.com</OPTION> <OPTION value=http://webmail.21cn.com/NULL/NULL/NULL/NULL/NULL/SignIn.gen;LoginName;passwd;post>21cn.com</OPTION> <OPTION value=http://webmail.21cn.net/nature/gb/NULL/NULL/NULL/SignIn.gen;LoginName;passwd;hidden;DomainName;21cn.net>21cn.net</OPTION> <OPTION value=http://webmail.263.net/xmweb;usr;pass;post;func;login>263.net</OPTION> <OPTION 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> <OPTION value=http://entry.126.com/cgi/login;user;pass;post>126.com</OPTION> <OPTION value=http://vip.163.com/payment/VipLogon.jsp;username;password;post>vip.163.com</OPTION> <OPTION value=http://web.netease.com/cgi/login;user;pass;post>netease.com</OPTION> <OPTION value=http://web.yeah.net/cgi/login;user;pass;post>网易Yeah.net</OPTION> <OPTION value=http://freemail.china.com/extend/gb/NULL/NULL/NULL/SignIn.gen;LoginName;passwd;post>mail.china.com</OPTION> <OPTION value=http://paymail.china.com/extend/gb/NULL/NULL/NULL/SignIn.gen;LoginName;passwd;post>China 信天邮</OPTION> <OPTION value=http://login.mail.sohu.com/chkpwd.php;UserName;Password;post>搜狐sohu.com</OPTION> <OPTION value=http://www.citiz.net/login.jsp;username;password;post>citiz.net</OPTION> <OPTION value=http://login.chinaren.com/zhs/servlet/Login;username;password;post;hidden;url;http://mail.chinaren.com>ChinaRen.com</OPTION> <OPTION value=http://mw1.elong.com/cgi-bin/weblogon.cgi;username;password;post>e龙elong.com</OPTION> <OPTION value=http://login.etang.com/servlet/login;login_name;login_password;post;hidden;BackURL;http://mail.etang.com/cgi/door>亿唐etang.com</OPTION> <OPTION value=http://edit.bjs.yahoo.com/config/login;login;passwd;post>雅虎yahoo.com.cn </OPTION> <OPTION value=http://mail.2911.net/cgi-bin/mail/main.pl;USERNAME;PASSWORD;post>2911中文邮局</OPTION> <OPTION 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> <OPTION value=https://login.passport.com/ppsecure/post.srf?da=passport.com&svc=mail;login;passwd;suffix;hotmail.com>hotmail.com</OPTION> <OPTION value=https://login.passport.com/ppsecure/post.srf?da=passport.com&svc=mail;login;passwd;suffix;msn.com>msn.com</OPTION></SELECT> </TD>
</TR>
<TR align=middle>
<TD colSpan=2 height=23><font face="宋体" size="2" color=#000000>登录密码 </font> <INPUT style="FONT-SIZE: 12px" onfocus=this.select() tabIndex=3 type=password size=25 name=password> </TD></TR>
<TD height=23 ALIGN="RIGHT" ><INPUT style="button" onclick="return check(document.mailForm)" tabIndex=4 type=submit value=登  录></TD>

</TBODY></TABLE>




</TD></FORM>


</TR></TBODY></TABLE>
</div>
</body>
</html>


怎样让登录邮箱是在当前窗口打开?我这里有一段登录邮箱的代码,谢谢
请问应该怎么改?非常感谢!全副家当只有4分了!谢谢各位大侠!谢谢
...全文
520 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
falee 2009-08-05
  • 打赏
  • 举报
回复
<FORM name="mailForm" onsubmit="return check(this)" method="post" target="_self">
falee 2009-08-05
  • 打赏
  • 举报
回复
<FORM name="mailForm" onsubmit="return check(this)" method="post" target="_self">

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧