亚洲今日精彩视频_精品一级黄色_免费一级A片在现观看视频_8050福利视频 - 一级免费黄色片

首頁(yè) 新聞資訊 技術(shù)文章
使用asp提交表單方式直接登錄imail8.1x版本郵箱的代碼分析(原創(chuàng))

經(jīng)常碰到客戶要求直接從網(wǎng)站主頁(yè)登錄到郵箱,而郵箱系統(tǒng)是imail8.1x,經(jīng)過一番修改測(cè)試,成功登錄;8.22版本未試,但應(yīng)該也適用。現(xiàn)將代碼發(fā)布供大家分享:

'實(shí)現(xiàn)登錄檢查及提交表單

<SCRIPT language=javascript>
<!--
if (top.location !== self.location) {
top.location=self.location;
}

function window_onload() {

 usernameshow.focus();

}

function gook() {

 if (usernameshow.value == "")
 {
  alert("用戶名不可為空");
  usernameshow.focus();
  return ;
 }

 if (pwshow.value == "")
 {
  alert("密碼不可為空");
  pwshow.focus();
  return ;
 }


 f1.saveUser.value = showsaveUser.checked;
 f1.username.value = usernameshow.value;

 f1.SecEx.value = showSecEx.checked;
 f1.pwhidden.value = encode(pwshow.value, parseInt(f1.picnum.value));

 f1.submit();
}

function encode(datastr, bassnum) {
 var tempstr;
 var tchar;
 var newdata = "";

 for (var i = 0; i < datastr.length; i++)
 {
  tchar = 65535 + bassnum - datastr.charCodeAt(i);
  tchar = tchar.toString();

  while(tchar.length < 5)
  {
   tchar = "0" + tchar;
  }

  newdata = newdata + tchar;
 }

 return newdata;
}
//-->
</SCRIPT>

 

'網(wǎng)頁(yè)上郵箱登錄表單

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <form name="f1" method="post" action="http://mail.xxxx.com/default.asp" target="_blank">
                        <input type="hidden" name="username">
                        <input type="hidden" name="pwhidden">
                        <input type="hidden" name="picnum" value="<%=createRnd() %>">
                        <input type="hidden" name="saveUser">
                        <input type="hidden" name="SecEx">
                      </form>
                      <tr>
                        <td width="16%">郵箱登陸</td>
                        <td width="14%">用戶名</td>
                        <td width="20%" ><input name="usernameshow" type="text" id="usernameshow" size="10"></td>
                        <td width="9%">密碼</td>
                        <td width="21%"><input name="pwshow" type="password" id="pwshow" size="10" ></td>
                        <td width="20%"><input type="submit" name="Submit3" value="登 陸" onClick="javascript:gook()"></td>
                      </tr>
<% if showaccounts = "" then %>
                      <input type="hidden" name="showSecEx">
                      <input type="hidden" name="showsaveUser">                     
<% else %>
                      <input type="hidden" name="showSecEx">
<% end if %>
</table>

 

版權(quán)所有:武漢網(wǎng)福互聯(lián)科技有限公司    鄂ICP備09022096號(hào)
業(yè)務(wù)QQ:23444550 客服QQ:267052100 電郵:23444550@qq.com  

鄂公網(wǎng)安備 42010602000905號(hào)

手機(jī)站二維碼