2 精币
移动梦网登录返回的文本,怎么来判断是否登录成功?
[e].版本 2
.支持库 spec
post地址 = “www.monternet.com/portal/web/doLogon.do ”
post数据 = “MSISDN= ” + 删首尾空 (手机号码.内容) + “ &password= ” + 删首尾空 (梦网密码.内容) + “&imgCode=” + 删首尾空 (验证码.内容) + “&go2URL=%2Findex.html&needActUSER=true&imageField.x=24&imageField.y=13”
返回文本 = 到文本 (彗星HTTP读文件 (post地址, “POST”, , , post数据))
调试输出 (返回文本)
[/e]
下面是调试返回的数据,麻烦帮忙看看!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>欢迎来到移动梦网</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/themes/web/default/style/mon2004.css" type="text/css">
<script language="javascript" src="/themes/web/default/js/subscribe.js"></script>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><span></span>
</td>
</tr>
<tr>
<td colspan="2"><table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td height="1"></td> </tr> </table>
</td>
</tr>
<tr>
<td colspan="2">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/include/mon2004.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 { color: #FFFFFF;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
</head>
<body>
</body>
</html>
</td>
</tr>
<tr>
<td colspan="2">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="1" bgcolor="#808080"></td>
</tr>
<tr>
<td height="24" bgcolor="efefef"> <strong>您的位置: </strong><a href="/index.html">移动梦网首页
</a> > 我的梦网 > 用户登录 </td>
</tr>
</table>
</body>
</html>
</td>
</tr>
<tr>
<td width="511" valign="top">
<SCRIPT LANGUAGE="JavaScript">
function redirectFun(){
window.location.href="";
}
</SCRIPT>
<form name="logonForm" method="post" action="/portal/web/doLogon.do" onsubmit="return check();">
<TABLE cellSpacing=0 cellPadding=0 width=470>
<TBODY>
<TR>
<TD colSpan=2><IMG height=61 src="/image/serve/loss_1.gif"
width=470></TD>
</TR>
<TR>
<TD height="29" valign="top"><img src="/image/serve/loss_2.gif" width="38" height="17"></TD>
<TD valign="top"><span class="clew style5"><font color="red"><strong>
您输入的附加码不正确!<br></strong></font></span></TD>
</TR>
<TR>
<TD colSpan=2 height=20><IMG height=1
src="/image/serve/loss_3.gif" width=470></TD>
</TR>
<TR>
<TD width="40"> </TD>
<TD width="200"> <TABLE cellSpacing=1 cellPadding=0 width=200 align=center>
<TBODY>
<TR>
<TD width=103 height=30><IMG height=23
src="/image/serve/loss_4.gif" width=103></TD>
<TD width=325 colspan="2"><input type="text" name="MSISDN" maxlength="13" size="13" value="" style="width=100;height=18" class="bbsinput" id="username"> </TD>
</TR>
<TR>
<TD width=103 height=40><IMG height=23
src="/image/serve/loss_5.gif" width=103></TD>
<TD width=325 colspan="2"> <input type="password" name="password" maxlength="8" size="12" value="" style="width=100;height=18" class="bbsinput" id="password">
</TD>
</TR>
<TR>
<TD height=30><IMG height=23
src="/image/serve/loss_6.gif" width=103></TD>
<td valign="bottom" width="20" >
<input type="text" name="imgCode" maxlength="6" size="6" value=""></td> <!-- @CheckItem@ REQ-ZHANGMIN-20050508 PATCH 4×× 发现的问题修改 -->
<td valign="bottom" align="center" > <img src="/authcode" ></td>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD colSpan=3> </TD>
</TR>
<TR>
<TD colSpan=2><IMG height=1 src="/image/serve/loss_3.gif"
width=470></TD>
</TR>
<TR bgColor=#dfdfd8>
<TD align=middle colSpan=3 height=30> <TABLE cellSpacing=0 cellPadding=0 width=460 align=center>
<TBODY>
<TR align=middle>
<TD height="29" align="center">
<input class="unnamed1" type="image" name="imageField" src="/image/button/log_but01.gif" border="0">
<a href="/portal/web/register.do"><img src="/image/button/log_but02.gif" width="31" height="17" border="0"></a> <a href="/portal/web/retrievePassword.do" target="_top"><img src="/image/button/chongzhimima.gif" width="60" height="17" border="0"></a></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD colSpan=3><IMG height=1 src="/image/serve/loss_3.gif"
width=470></TD>
</TR>
</TBODY>
</TABLE>
<INPUT TYPE="hidden" name="needActUSER" value="false">
<INPUT TYPE="hidden" name="go2URL" value="/index.html">
</form>
<script type="text/javascript" language="JavaScript">
<!--
var focusControl = document.forms["logonForm"].elements["MSISDN"];
if (focusControl.type != "hidden") {
focusControl.focus();
}
// -->
</script>
<SCRIPT LANGUAGE="JavaScript">
function checkMsisdn(mobileId){
var reg_format_1= /^13\d{9}$/
var reg_format_2= /^15\d{9}$/
var reg_format_3= /^18\d{9}$/
var reg_format_4= /^14\d{9}$/
var reg_format_5= /^10\d{9}$/
var reg_format_6= /^1064\d{9}$/
var reg_1= /^135\d{8}$/
var reg_2= /^136\d{8}$/
var reg_3= /^137\d{8}$/
var reg_4= /^138\d{8}$/
var reg_5= /^139\d{8}$/
var reg_6= /^15\d{9}$/
var reg_7= /^1340\d{7}$/
var reg_8= /^1341\d{7}$/
var reg_9= /^1342\d{7}$/
var reg_10= /^1343\d{7}$/
var reg_11= /^1344\d{7}$/
var reg_12= /^1345\d{7}$/
var reg_13= /^1346\d{7}$/
var reg_14= /^1347\d{7}$/
var reg_15= /^1348\d{7}$/
var reg_16= /^18\d{9}$/
var reg_17= /^147\d{8}$/
var reg_18= /^182\d{8}$/
var reg_19= /^133\d{8}$/
var reg_20= /^153\d{8}$/
var reg_21= /^189\d{8}$/
var reg_22= /^130\d{8}$/
var reg_23= /^131\d{8}$/
var reg_24= /^132\d{8}$/
var reg_25= /^145\d{8}$/
var reg_26= /^155\d{8}$/
var reg_27= /^156\d{8}$/
var reg_28= /^186\d{8}$/
var reg_29= /^183\d{8}$/
var reg_30= /^1064\d{9}$/
if(mobileId.length>=3) mobileId = mobileId.replace(/^\+86/,'');
if(mobileId.length>=2) mobileId = mobileId.replace(/^\86/,'');
if (reg_format_1.test(mobileId)||reg_format_2.test(mobileId)||reg_format_3.test(mobileId)||reg_format_4.test(mobileId)||reg_format_5.test(mobileId)||reg_format_6.test(mobileId)){
}else{
alert("您输入的手机号码不正确,请重新输入。");
return false;
}
if (reg_1.test(mobileId)||reg_2.test(mobileId)||reg_3.test(mobileId)||reg_4.test(mobileId)||reg_5.test(mobileId)||reg_6.test(mobileId)||reg_7.test(mobileId)||reg_8.test(mobileId)||reg_9.test(mobileId)||reg_10.test(mobileId)||reg_11.test(mobileId)||reg_12.test(mobileId)||reg_13.test(mobileId)||reg_14.test(mobileId)||reg_15.test(mobileId)||reg_16.test(mobileId)||reg_17.test(mobileId)||reg_18.test(mobileId)||reg_19.test(mobileId)||reg_20.test(mobileId)||reg_21.test(mobileId)||reg_22.test(mobileId)||reg_23.test(mobileId)||reg_24.test(mobileId)||reg_25.test(mobileId)||reg_26.test(mobileId)||reg_27.test(mobileId)||reg_28.test(mobileId)||reg_29.test(mobileId)||reg_30.test(mobileId)){
return true;
}else{
alert("对不起,我们的服务暂不对非中国移动用户开放!");
return false;
}
}
</SCRIPT>
<script language="Javascript1.1" type="text/javascript" src="/themes/web/default/js/wwwportal_fun.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.logonForm.MSISDN.value="";
if(document.logonForm.MSISDN.value != ""){
document.logonForm.password.focus();
}else{
document.logonForm.MSISDN.focus();
}
document.logonForm.password.value = "";
document.logonForm.imgCode.value = "";
var change=false;//用来区分是否提交过表单
function check(){
if(change) return false;
//如果change为true就返回失败,不再提交
if(document.logonForm.MSISDN.value==""){
alert("手机号不能为空!");
document.logonForm.MSISDN.focus();
return false;
}
if(document.logonForm.password.value==""){
alert("密码不能为空!");
document.logonForm.password.focus();
return false;
}
if(chkMSISDN(document.logonForm.MSISDN)&&checkCharOrDigital(document.logonForm.password,'密码')&&checkImgCode(document.logonForm.imgCode)){
change=true;//将change赋值为true下次不再提交。
return true;
}else{
return false;
}
}
//-->
</SCRIPT>
</td>
<td valign="top"><!-- saved from url=(0022)http://internet.e-mail -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="239" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="239" height="65"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td height="45" align="left" valign="top" bgcolor="#FFFFFF">· <a href="/moneditor/cs/wap/wapguide/index.html">WAP门户FAQ</a>
· <a href="/moneditor/cs/wap/wapguide/index.html">彩信FAQ</a><br>
· <a href="/moneditor/cs/wap/wapguide/index.html"> 短*FAQ</a> ·
<a href="/moneditor/cs/wap/wapguide/index.html">百宝箱FAQ</a><br>
· <a href="/moneditor/cs/wap/wapguide/index.html"> PDA门户FAQ</a> <span class="style1">·</span>
<a href="/moneditor/cs/wap/wapguide/index.html" >资费标准</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" valign="top"><img src="/image/ad/ad_01.gif" width="237" height="219"></td>
</tr>
</table>
</body>
</html>
</td>
</tr>
<tr>
<td colspan="2"><center>
<iframe src=http://www.monternet.com/moneditor/cs/2005web/moyw/foot/index.html noResize scrolling=no frameBorder=0 width="750" height=81 marginHeight=0 marginWidth=0></iframe>
</center>
<!-- START NNR Site Census V5.1 -->
<!-- COPYRIGHT 2004 Nielsen // Netratings -->
<script language="JavaScript" type="text/javascript">
<!--
var _rsCI="cn-chinamobile";
var _rsCG="0";
var _rsDT=0;
var _rsDU=0;
var _rsDO=0;
var _rsX6=0;
var _rsSI=escape(window.location);
var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';
var _rsRP=escape(document.referrer);
var _rsND=_rsLP+'//secure-cn.imrworldwide.com/';
if (parseInt(navigator.appVersion)>=4)
{
var _rsRD=(new Date()).getTime();
var _rsSE=1;
var _rsSV="";
var _rsSM=0.01;
_rsCL='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rsND+'v51.js"><\/scr'+'ipt>';
}
else
{
_rsCL='<img src="'+_rsND+'cgi-bin/m?ci='+_rsCI+'&cg='+_rsCG+'&si='+_rsSI+'&rp='+_rsRP+'">';
}
document.write(_rsCL);
//-->
</script>
<noscript>
<img src="//secure-cn.imrworldwide.com/cgi-bin/m?ci=cn-chinamobile&cg=0" alt="">
</noscript>
<!-- END NNR Site Census V5.1 -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1578197-1";
urchinTracker();
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F79e69e5e08008b2e30c9cf6e655ac2f8' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>
</td>
</tr>
</table>
</body>
<HEAD> 复制代码 谢谢啦!需要补充的请说下!
我来回答