久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

X3.5如何發(fā)送登錄POST請求

1118 4 0提示:支持鍵盤翻頁<-左 右-> 73327424 發(fā)表于 2024-7-5 15:54 帖子模式

假設用戶名為43102827 密碼為12345678 把這個POST請求發(fā)送到哪個文件 POST的數(shù)據(jù)內(nèi)容是什么 查看全文

    組圖打開中,請稍候......

評論4個評論

73327424發(fā)表于  2024-7-5 17:21:13

如果這樣正確的那么接下來干什么
73327424發(fā)表于  2024-7-5 17:20:25
mingkong 發(fā)表于 2024-7-5 16:18
打開頁面
http://www.9999xn.com/member.php?mod=logging&action=login
查看表單元素

這樣對不對
  1.                  * 根據(jù)密碼登錄
  2.                  */
  3.                 indexCtrl.prototype.login4pwd = function () {
  4.                         var username = $(".login-container-top input[name='username']").val();
  5.                         var password = $(".login-container-top input[name='password']").val();
  6.                         password = btoa(password);
  7.                         if (!username || username.trim() == '' || !password
  8.                                 || password.trim() == '') {
  9.                                 DialogComponent.showMsg('用戶名或密碼不能為空');
  10.                                 return;
  11.                         }
  12.                         $.ajax({
  13.                                 type: "POST",
  14.                                 url: "member.php?mod=logging&amp;action=login&amp;loginsubmit=yes&amp;loginhash=LgMSq",
  15.                                 data: "username=" + username + "&password=" + password,
  16.                                 success: function (result) {
  17.                                         if (!result) {
  18.                                                 DialogComponent.showMsg("用戶名或密碼錯誤");
  19.                                                 return;
  20.                                         }
  21.                                         $(".login-container-top-btn a").text("正在登錄...");
  22.                                         if (!result.data || 0 == result.data.length) {
  23.                                                 indexCtrl.prototype.getCurUser(function (res) {
  24.                                                         indexCtrl.prototype.bindChild(res, username, password);
  25.                                                 });
  26.                                         } else if (result.data.length > 1) {
  27.                                                 indexCtrl.prototype.getCurUser();
  28.                                                 localStorage.setItem("all_role", JSON.stringify(result.data));
  29.                                                 for (var i = 0; i < result.data.length; i++) {
  30.                                                         if (result.data[i].category == "TEACHER") {
  31.                                                                 _this.router2Index();
  32.                                                                 return;
  33.                                                         }
  34.                                                 }
  35.                                                 window.location.href = "toggle_role.jsp";
  36.                                                 return;
  37.                                         } else {
  38.                                                 indexCtrl.prototype.getCurUser();
  39.                                                 _this.router2Index();
  40.                                         }
  41.                                 },
  42.                                 error: function (error) {
  43.                                         if (error && error.responseJSON && error.responseJSON.errorCode == '800002') {
  44.                                                 window.location.href = 'stu_qrcode.jsp';
  45.                                                 return;
  46.                                         }
  47.                                         var obj = eval('(' + error.responseText + ')');
  48.                                         DialogComponent.showMsg(obj.message);
  49.                                 }
  50.                         });
  51.                 };
復制代碼
mingkong發(fā)表于  2024-7-5 16:18:27
打開頁面
http://www.9999xn.com/member.php?mod=logging&action=login
查看表單元素
  1. <form method="post" autocomplete="off" name="login" id="loginform_LgMSq" class="cl" onsubmit="pwdclear = 1;ajaxpost('loginform_LgMSq', 'returnmessage_LgMSq', 'returnmessage_LgMSq', 'onerror');return false;" action="member.php?mod=logging&amp;action=login&amp;loginsubmit=yes&amp;loginhash=LgMSq">
  2. <div class="c cl">
  3. <input type="hidden" name="formhash" value="0cca2968">
  4. <input type="hidden" name="referer" value="http://www.9999xn.com/thread-22748-1-1.html">
  5. <div class="rfm">
  6. <table>
  7. <tbody><tr>
  8. <th>
  9. <span class="login_slct">
  10. <select name="loginfield" style="float: left; display: none;" width="45" id="loginfield_LgMSq" selecti="0">


  11. <option value="username"></option></select><a href="javascript:;" id="loginfield_LgMSq_ctrl" style="width:45px">用戶名</a>
  12. </span>
  13. </th>
  14. <td><input type="text" name="username" id="username_LgMSq" autocomplete="off" size="30" class="px p_fre" value="" placeholder="用戶名/Email"></td>
  15. </tr>
  16. </tbody></table>
  17. </div>
  18. <div class="rfm">
  19. <table>
  20. <tbody><tr>
  21. <th><label for="password3_LgMSq">密碼:</label></th>
  22. <td><input type="password" id="password3_LgMSq" name="password" onfocus="clearpwd()" placeholder="請輸入密碼" size="30" class="px p_fre"></td>
  23. <td><a href="javascript:;" onclick="display('layer_login_LgMSq');display('layer_lostpw_LgMSq');" title="找回密碼" style="margin-left:8px;font-size:13px;color:var(--comiis-ahot)">忘記密碼?</a></td></tr>
  24. </tbody></table>
  25. </div>
  26. <div class="rfm">
  27. <table>
  28. <tbody><tr>
  29. <th>安全提問:</th>
  30. <td><select id="loginquestionid_LgMSq" width="213" name="questionid" onchange="if($('loginquestionid_LgMSq').value > 0) {$('loginanswer_row_LgMSq').style.display='';} else {$('loginanswer_row_LgMSq').style.display='none';}">
  31. <option value="0">安全提問(未設置請忽略)</option>
  32. <option value="1">母親的名字</option>
  33. <option value="2">爺爺?shù)拿?lt;/option>
  34. <option value="3">父親出生的城市</option>
  35. <option value="4">您其中一位老師的名字</option>
  36. <option value="5">您個人計算機的型號</option>
  37. <option value="6">您最喜歡的餐館名稱</option>
  38. <option value="7">駕駛執(zhí)照最后四位數(shù)字</option>
  39. </select></td>
  40. </tr>
  41. </tbody></table>
  42. </div>
  43. <div class="rfm" id="loginanswer_row_LgMSq" style="display:none">
  44. <table>
  45. <tbody><tr>
  46. <th>答案:</th>
  47. <td><input type="text" name="answer" id="loginanswer_LgMSq" placeholder="請輸入答案" autocomplete="off" size="30" class="px p_fre"></td>
  48. </tr>
  49. </tbody></table>
  50. </div>
  51. <span id="seccode_cSu7JIim"><input name="seccodehash" type="hidden" value="cSu7JIim"><input name="seccodemodid" type="hidden" value="member::logging"><div class="rfm"><table><tbody><tr><th>驗證碼: </th><td class="comiis_login_sec"><input name="seccodeverify" id="seccodeverify_cSu7JIim" type="text" autocomplete="off" style="ime-mode:disabled;width:100px" class="txt px vm" onblur="checksec('code', 'cSu7JIim', 0, null, 'member::logging')"> <a href="javascript:;" onclick="updateseccode('cSu7JIim');doane(event);" class="xi2">換一個</a><span id="checkseccodeverify_cSu7JIim"><i class="fico-checkbox fic4 fc-t fnmr vm"></i></span><span id="vseccode_cSu7JIim">輸入下圖中的字符<br><img onclick="updateseccode('cSu7JIim')" width="100" height="30" src="misc.php?mod=seccode&amp;update=38429&amp;idhash=cSu7JIim" class="vm" alt=""></span></td></tr></tbody></table></div></span>               
  52. <script type="text/javascript" reload="1">updateseccode('cSu7JIim', '<div class="rfm"><table><tr><th><sec>: </th><td class="comiis_login_sec"><sec><sec></td></tr></table></div>', 'member::logging');</script>
  53. <div class="rfm" style="margin-bottom:-10px">
  54. <table>
  55. <tbody><tr>
  56. <th style="padding:0 10px 0 2px"></th>
  57. <td style="padding:0 2px">                                                                       
  58. <label for="cookietime_LgMSq"><input type="checkbox" class="pc" name="cookietime" id="cookietime_LgMSq" value="2592000">自動登錄</label>                                                               
  59. </td>
  60. </tr>
  61. </tbody></table>
  62. </div>
  63. <div class="rfm mbm bw0">
  64. <table width="100%">
  65. <tbody><tr>
  66. <th>&nbsp;</th>
  67. <td>
  68. <button class="pn pnc" type="submit" name="loginsubmit" value="true"><strong>登錄</strong></button>
  69. <div class="km_dzwdl">    其他登錄方式
  70.     <script src="static/js/iconfont.js?NF0" type="text/javascript"></script>
  71.             <a style="margin-left: 5px" href="login.php?method=wechat" title="微信"><svg class="iconfont" aria-hidden="true"><use xlink:href="#icon-weixin"></use></svg></a>
  72.             <a style="margin-left: 5px" href="login.php?method=qq" title="QQ"><svg class="iconfont" aria-hidden="true"><use xlink:href="#icon-social-qq"></use></svg></a>
  73.             <a style="margin-left: 5px" href="login.php?method=douyin" title="抖音"><svg class="iconfont" aria-hidden="true"><use xlink:href="#icon-douyin"></use></svg></a>
  74.     </div>
  75. </td>
  76. <td>
  77.                                                                
  78. </td>
  79. </tr>
  80. </tbody></table>
  81. </div>
  82. </div>
  83. </form>
復制代碼


  • 關注公眾號
  • 有償服務微信
  • 有償服務QQ

手機版|小黑屋|Discuz! 官方交流社區(qū) ( 皖ICP備16010102號 |皖公網(wǎng)安備34010302002376號 )|網(wǎng)站地圖|star

GMT+8, 2025-9-18 18:24 , Processed in 0.078300 second(s), 35 queries .

Powered by Discuz! W1.0 Licensed

Copyright © 2001-2025 Discuz! Team.

關燈 在本版發(fā)帖
有償服務QQ
有償服務微信
返回頂部
快速回復 返回頂部 返回列表