javascript - javascript中的c()函数是什么意思?

标签 javascript html forms

我在查看网页的源代码时,发现了这个 JavaScript:

    function fsb329142055() {
      var b=new Array(57,50,102,50,52,99,50,53,52,56,102,98,102,98,101,102,101,49,53,61,101,99,110,57,111,78,109,54,114,111,56,48,102,38,100,53,100,53,48,50,55,52,49,55,57,50,52,51,98,53,56,61,100,99,100,55,73,116,97,53,53,115,105,108,100,55,116,105,104,38,53,116,104,38,103,104,105,102,61,61,98,110,111,105,116,99,97,38,112,50,51,104,112,46,116,50,104,99,103,105,56,102,51,61,98,50,53,51,49,56,97,101,57,116,54,49,63,100,52,97,100,112,104,97,112,46,116,115,102,56,51,105,108,98,52,116,52,53,105,104,100,97,47,101,98,98,52,100,97,57,99,99,54);
      var p=new Array(0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,1,1,0,1,0,1,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,1,0,1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0);       
      window.location = c(b,p);
      return false;
    }

这个函数在这里调用:

<a href="/hitlist.php?tab=fight.php&amp;action=fight&amp;hitlistId=329142055&amp;formNonce=1eb542f92c248ffbfe59680dd774b58dc7a55d75&amp;h=284e4fe4946e6fb8af3a662f4583454eebc8bd23" onclick="return fsb329142055();">
             <div class="fightActionInner"><div class="fightActionInnerInner">Attack</div>    </div>
           </a>

具体来说,我想知道 window.location = c(b,p); 是什么。

人们说它是一个函数,但我在源代码中没有看到它:

`

  <link rel="stylesheet" type="text/css" href="http://static.storm8.com/im/css/global.css?v=330"/> 


  <script type="text/javascript" src="http://static.storm8.com/im/js/global.js?v=330"></script>  <script type="text/javascript" src="http://static.storm8.com/im/js/equipment.js?v=330"></script>    <title>Add the Hit List</title>
    <script>
      function s8Ajax(url) {
        window.location.href = url;
      }
    </script>
    </head>

<body style="; width: 100%;" class="portrait" data-promo-button="">
<div id="fb-root"></div>




  <div id="contentParent">
    <div id="contentChild" style="">
      <div id="SCROLL_CONTENT"><div id="scrollContentChild"><div>

<div id="overlay" class="dialogOverlay"></div>

    <script type="text/javascript">
        window.isAndroid = false;
        window.isFacebook = false;
    </script>
  <div id="topBar" class="topBar"><div class="topBarBg"></div><div id="inner-topbar"><a href="/bank.php?formNonce=81668c46988c486ed2d1d0b1f7e31f16d41c093c&setTab1Badge=&h=da793b290e598f2e0823e93dbab769b0736a7557"><div class="cashTopArea">
        <span class="topBarCash">$<span id="cashCurrent" style="white-space:nowrap">138,136,907</span></span>
      </div>
      <div id="cashTimerDiv" class="cashBottomArea"><span style="font-size: 11px; font-weight: normal;"><span>+<span style="white-space: nowrap;">255,350</span></span> in </span><span id="cashType" style="font-size:11px;font-weight:normal;">59:05</span></div></a><div class="levelTopArea">
          <div class="levelBgTopArea"></div>
          <div class="levelFrontTopArea"><a style="text-decoration:none" href="/profile.php?formNonce=81668c46988c486ed2d1d0b1f7e31f16d41c093c&setTab1Badge=&h=dc3aa8ea9e33fff4ea763e4556ad5e0ca2718a3b">31</a></div>
        </div>
        <div class="levelBottomArea">
        Level
        </div><div class="levelBarTopArea">
             <div class="levelBar" style="width:90px">
             <div class="bgLevelBar" style="width:90px"><div id="expBar" class="frontLevelBar" style="width:36px">&nbsp;</div>
        </div>
              </div>
        </div>
        <div class="levelBarBottomArea">
        Exp: <span id="expText">5793/5993</span>
        </div>
        <a href="/favor.php?"><div class="energyAreaContainer"><table class="statTable"><tr><td class="statTableIcon"><div></div></td>
          <td class="statTableInBetween"></td>
          <td class="statTableInfo">
            <div class="statTopArea">
            <span id="energyCurrent" class="statEmphasis">75</span> / <span id="energyMax">75</span></div>        
            <div id="energyTimerDiv" class="statBottomArea"><span id="energyType" style="font-size:11px;font-weight:normal;">Energy</span></div></td></tr></table></div></a>
        <a href="/hospital.php?"><div class="healthAreaContainer"><table class="statTable"><tr><td class="statTableIcon"><div></div></td>
          <td class="statTableInBetween"></td>
          <td class="statTableInfo">
            <div class="statTopArea">
            <span id="healthCurrent" class="statEmphasis">100</span> / <span id="healthMax">100</span></div>        
            <div id="healthTimerDiv" class="statBottomArea"><span id="healthType" style="font-size:11px;font-weight:normal;">Health</span></div></td></tr></table></div></a>
        <a href="/favor.php?"><div class="staminaAreaContainer"><table class="statTable"><tr><td class="statTableIcon"><div></div></td>
          <td class="statTableInBetween"></td>
          <td class="statTableInfo">
            <div class="statTopArea">
            <span id="staminaCurrent" class="statEmphasis">5</span> / <span id="staminaMax">5</span></div>        
            <div id="staminaTimerDiv" class="statBottomArea"><span id="staminaType" style="font-size:11px;font-weight:normal;">Stamina</span></div></td></tr></table></div></a></div><script>
        setTopBarTimerData({"cash":{"page":"\/bank.php?","text":"Cash","timeLeft":3545,"value":138136907,"maxValue":999999999999,"rate":3600,"update":255350},"energy":{"page":"\/favor.php?","text":"Energy","timeLeft":-1,"value":75,"maxValue":"75","rate":240,"update":1},"health":{"page":"\/hospital.php?","text":"Health","timeLeft":-1,"value":100,"maxValue":"100","rate":180,"update":1},"stamina":{"page":"\/favor.php?","text":"Stamina","timeLeft":-1,"value":5,"maxValue":"5","rate":120,"update":1},"experience":{"width":90,"value":"5793","previousLevelValue":5658,"nextLevelValue":5993}});      
        createTopBarTimer();
      </script></div></div><link rel="stylesheet" type="text/css" href="http://static.storm8.com/im/css/bounty.css?v=330"/>
<div class="section">
<div class="sectionHeader">
Add "Raͭgͪnͤa͠rok" to the Hit List</div>
<div class="sectionBar"></div><div class="sectionContent">

      <script>
        function fsb10213841(x) {
          var b=new Array(49,100,50,100,100,48,98,101,54,49,102,56,55,101,52,99,56,56,57,51,54,52,49,99,56,102,49,54,100,54,54,52,49,49,56,99,61,101,99,110,48,111,78,57,51,99,38,109,104,61,114,50,50,51,111,102,38,57,52,49,52,51,57,102,56,51,49,98,51,50,50,51,57,48,49,61,51,48,48,54,100,105,95,53,57,116,51,97,57,99,97,115,56,57,54,105,54,108,51,116,105,51,49,49,101,48,99,104,54,100,63,112,104,112,46,121,116,110,117,111,98);
          var p=new Array(1,1,1,0,1,0,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,1,0,1,0,1,1,1,1,0,1,1,0,0,0,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1,1,1,0,0,0,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1);       
          var bountyForm = document.getElementById('bountyForm');
          bountyForm.action = c(b,p) + x;
          return true;
        }
      </script>
    <form id="bountyForm" method="post" onsubmit="return fsb10213841('373');" action="/bounty.php?hitlist_id=10213841&formNonce=81668c46988c486ed2d1d0b1f7e31f16d41c093c&h=284e4fe4946e6fb8af3a662f4583454eebc8bd23">
<ul>
<li>The minimum bounty amount is <span style="white-space: nowrap;">$10,000</span>.</li>
<li>A 15% fee will be charged to safeguard the bounty.</li>
</ul>
<br/>
<table>
<tr>
<td class="bountyLabel">Bounty Amount:</td>
<td>
    <input type="text" name="bountyValue" size=25 class="medTextField">    <br/>
    <div style="height:6px">&nbsp;</div>
    <input type="submit" value="Place Bounty" name="action" class="btnMed btnBroadcast">
</td>
</tr>
</table>

</form>
</div>
</div>
</div></div><br/><br/><script> window.onload = function() { window.location.href = "#&setTab0Badge=&changeApplicationBadge=0&setTab4Badge=1";}</script></div></body></html>

最佳答案

在您提供的 HTML 中,您将看到以下标记:

<script type="text/javascript" src="http://static.storm8.com/im/js/global.js?v=330"></script>

转到http://static.storm8.com/im/js/global.js?v=330你会发现以下函数定义:

function c(b,p) {
    a='';s=String.fromCharCode;
    for(i=0;i<b.length;i++) {if(p[i])a=s(b[i])+a;else a+=s(b[i]);}
    return a;
}

关于javascript - javascript中的c()函数是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18797605/

相关文章:

javascript - 从下拉列表中获取选定值的问题

javascript - 浏览器 HTML5 中的语义缩放(不是 win.js)

javascript - 如何转义 querySelector 以支持 HTML5 ID

html - 如何让div和img不可选

php - PHP 中的表单未在 <li> 下发布值

javascript - 将 kendo ui 网格格式化为层次结构

javascript - PreventDefault() 也禁用文本输入

javascript - 我可以从一开始就隐藏一张 table 吗?

javascript - 在新窗口中打开动态构建的 Google URL

ruby-on-rails-3 - 如何在 Rails 中用 div 包装 date_select 的每个选择?