bugfix1001.2

本WIKI于23/4/26申请开通,编辑权限开放,欢迎收藏,欢迎更多殿下加入我们来一起搭建!Wiki催更群:945258792
编辑帮助:指南 | 捉虫许愿:反馈

全站通知:

Widget:属性计算器

来自代号鸢WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

<html><style>

   .comput{
     color:#7a5d4b;
   }
    li {
        list-style: none;
    }
    .comput img{
    width: 40px;
    margin: 0;
    }
    .comput li{
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 10px;
    }
    #tupo img{
        width: 30px;
        border-radius: 50%;
    }
    #tupo{
     width: 90%;
   background: #fdfdfd;
   padding: 10px;
   border: 1px #ad9381 solid;
   border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    input{
      width: 120px;
      padding-left: 80px; 
    }
    .input-on{
        position: relative;
    }
    .input-on span{
    position: absolute;
    left: 20px; 
    }
   input, select {
    border: 1px #ad9381 solid;
    border-radius: 50px;
    margin: 0 5px;
 }
 .btn{
       border-radius: 50px;
    width: 100%;
    background: #9c877a;
    color: #fff;
 }
 .com_li{
 padding: 10px;
    background: #fbfbfb;
    margin: 10px;
    border: 1px #ad9381 solid;
    border-radius: 10px;
 }

p{

   margin: 0 20px 20px 0px;

} label input[type="radio"]+span{ border-radius:10%; } .radio-label,.radio-check {

 display: inline-block;
 position: relative;

} .radio-label input[type="radio"] {

 appearance: none; /*清除默认样式*/

-webkit-appearance: none;

 /* opacity: 0; */
 outline: none;
 position: absolute;
 z-index: 2;
 left: 0px;
 top: 10px;
 width: 2px;
 height:20px;
 border-radius: 50%;
 border:0px solid #C89887;
 background: rgb(255 255 255 0);

} .radio-label label {

 display: inline-block;
 min-width: 50px;
 height: 30px;
 width: 120px;
 font-size:12px;
 line-height:30px;
 text-align: center;
 padding: 4px;
 border-radius: 5px;
 padding-left: 25px;
 color: #C89887;
 border-right: 3px solid #C89887;
 margin: 3px;
 background-color: #fff;

} .radio-label input[type="radio"]:disabled+ label {

 color: #b3b3b3;
 background-color: #c9c9c9;
 border-right: 3px solid #c9c9c9;

} .radio-label input[type="radio"]:checked {

 opacity: 0;

} .radio-label input[type="radio"]:checked + label {

 color: #fff;
 background-color: #C89887;

} .radio-label input[type="radio"]:checked + label::after {

 content: "";
 position: absolute;
 left: 18px;
 top: 15px;
 width: 5px;
 height: 12px;
 border-right: 3px solid #fff;
 border-bottom: 3px solid #fff;
 transform: rotate(45deg);

}

</style>
<body>
    <form>

    密探选择

    名称:<input type="number" id="now"onkeyup="value=value.replace(/^(0+)|[^\d]+/g,)"> 职业: <select id="Herojob" onchange="updateDropdowns()"> <option value="请选择" selected>请选择</option> <option value="破军">破军</option> <option value="龙盾">龙盾</option> <option value="岐黄">岐黄</option> <option value="神纪">神纪</option> <option value="诡道">诡道</option> </select> 属性: <select name="shuxing" id="shuxing" onchange="btn_click2()"> <option value=1>风</option> <option value=2>火</option> <option value=3>地</option> <option value=4>水</option> <option value=5>阴</option> <option value=6>阳</option> </select>

    星级选择

    <img alt="计算器-目标养成.png" src="https://patchwiki.biligame.com/images/yuan/0/08/ix2qirry6iedocxms5jqpwgp94a8uxh.png" style=" width:500px" >

    星级:<select style="width: 100px;" name="zhiye" id="xinzhi2" onchange="btn_click3()">

    <option value=1>1-0</option> <option value=1>1-1</option> <option value=1>1-2</option> <option value=2>1-3</option> <option value=2>1-4</option> <option value=3>1-5</option> <option value=3>二星(2-0)</option> <option value=3>2-1</option> <option value4>2-2</option> <option value=4>2-3</option> <option value=5>2-4</option> <option value=5>2-5</option> <option value=5>三星(3-0)</option> <option value=6>3-1</option> <option value=6>3-2</option> <option value=7>3-3</option> <option value=7>3-4</option> <option value=8>3-5</option> <option value=8>四星(4-0)</option> <option value=8>4-1</option> <option value=9>4-2</option> <option value=9>4-3</option> <option value=10>4-4</option> <option value=10>4-5</option> <option value=10>五星(5-0)</option> <option value=10>觉醒</option>

    </select>
    生命蝶:<input type="number" value=0 id="hp"onkeyup="value=value.replace(/^(0+(\d))|[^\d]+/g,)"> 攻击蝶:<input type="number" value=0 id="atk"onkeyup="value=value.replace(/^(0+(\d))|[^\d]+/g,)">
    生命加成:
    暂无
    攻击加成:
    暂无

    星石选择

    <img alt="计算器-选择星石.png" src="https://patchwiki.biligame.com/images/yuan/0/08/ix2qirry6iedocxms5jqpwgp94a8uxh.png" style=" width:500px">
    

    星石1:<select id="Stone1"><option selected>请先选择密探</option></select> 等级:<select id="stoneLV1Dropdown" onchange="updateDropdownsLV()"> <option selected onchange="updateDropdownsLV()">--待选择--</option> <option value=1>1</option> <option value=2>10</option> <option value=3>10突破</option> <option value=4>20</option> <option value=5>20突破</option> <option value=6>30</option> <option value=7>30突破</option> <option value=8>40</option> <option value=9>40突破</option> <option value=10>50</option> <option value=11>50突破</option> <option value=12>60</option> </select>
    星石2:<select id="Stone2"><option selected>请先选择密探</option></select> 等级:<select id="stoneLV2Dropdown" onchange="updateDropdownsLV()"> <option selected onchange="updateDropdownsLV()">--待选择--</option> <option value=1>1</option> <option value=2>10</option> <option value=3>10突破</option> <option value=4>20</option> <option value=5>20突破</option> <option value=6>30</option> <option value=7>30突破</option> <option value=8>40</option> <option value=9>40突破</option> <option value=10>50</option> <option value=11>50突破</option> <option value=12>60</option> </select>
    星石3:<select id="Stone3"><option selected>请先选择密探</option></select> 等级:<select id="stoneLV3Dropdown" onchange="updateDropdownsLV()"> <option selected onchange="updateDropdownsLV()">--待选择--</option> <option value=1>1</option> <option value=2>10</option> <option value=3>10突破</option> <option value=4>20</option> <option value=5>20突破</option> <option value=6>30</option> <option value=7>30突破</option> <option value=8>40</option> <option value=9>40突破</option> <option value=10>50</option> <option value=11>50突破</option> <option value=12>60</option> </select>

    *目前仅支持橙色星石

    常用组合

    攻击组合生命组合
    <input type="radio" id="FavorStone1" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone1">天府+武曲+破军</label>

    <input type="radio" id="FavorStone2" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone2">天府+七杀+太阳</label>

    <input type="radio" id="FavorStone3" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone3">天府+武曲+天机</label>

    <input type="radio" id="FavorStone6" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone6">破军+七杀+贪狼</label>

    <input type="radio" id="FavorStone4" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone4">紫薇+天相+巨门</label>

    <input type="radio" id="FavorStone5" name="favorStone" onchange="updatefavorStone()" disabled=true><label for="FavorStone5">天相+天同+天梁</label>

    结论面板

    <img alt="计算器-结论区.png" src="https://patchwiki.biligame.com/images/yuan/b/b8/gffeglafao7svbc8lhwn4qi58jzala8.png" style=" width:500px" >

    面板生命:<output type="number" value=0 id="hp" onkeyup="value=value.replace(/^(0+(\d))|[^\d]+/g,)">
    面板攻击:<output type="number" value=0 id="atk" onkeyup="value=value.replace(/^(0+(\d))|[^\d]+/g,)"> <button class="btn" onclick="btn_click3()" style="width:auto;border-radius: 5px;">
    暂无
    </button> <button class="btn" style="width:auto;border-radius: 5px;"><input type="reset" class="btn" value="重置" style="width:auto;border-radius: 0px;margin:1%;padding:10px 10px;"></button>

    </form>
</body>
<script>//星石选项
  var Stonelist = [
           ["破军", ["天府", "天相", "巨门", "太阳", "廉贞", "太阴", "七杀", "武曲", "天同", "破军", "天梁", "贪狼"]],
           ["龙盾", ["天府", "天相", "巨门", "太阳", "廉贞", "太阴", "七杀", "武曲", "天同", "紫薇", "天梁"]],
           ["岐黄", ["天府", "天相", "巨门", "太阳", "廉贞", "太阴", "七杀", "武曲", "天同", "天梁"]],
           ["神纪", ["天府", "天相", "巨门", "太阳", "廉贞", "太阴", "七杀", "武曲", "天同", "天机", "天梁"]],
           ["诡道", ["天府", "天相", "巨门", "太阳", "廉贞", "太阴", "七杀", "武曲", "天同", "天机", "天梁"]]
  ];	
  function updateDropdowns() {
    // 获取下拉菜单和radio的元素
    var heroJobDropdown = document.getElementById("Herojob");
    var stone1Dropdown = document.getElementById("Stone1");
    var stone2Dropdown = document.getElementById("Stone2");
    var stone3Dropdown = document.getElementById("Stone3");  
    var favorStone1 = document.getElementById("FavorStone1");
    var favorStone2 = document.getElementById("FavorStone2");
    var favorStone3 = document.getElementById("FavorStone3");
    var favorStone4 = document.getElementById("FavorStone4");
    var favorStone5 = document.getElementById("FavorStone5");
    var favorStone6 = document.getElementById("FavorStone6");
    // 获取选中的值和行
    var selectedHeroJob = heroJobDropdown.value;
    var rowIndex = -1;
  
    for (var i = 0; i < Stonelist.length; i++) {
      if (Stonelist[i][0] === selectedHeroJob) {
        rowIndex = i;
        break;
      }
    }
  
    // 更新Stone1下拉菜单
    stone1Dropdown.innerHTML = "";
    for (var i = 0; i < Stonelist[rowIndex][1].length; i++) {
      var option = document.createElement("option");
      option.text = Stonelist[rowIndex][1][i];

option.value = Stonelist[rowIndex][1][i];

      stone1Dropdown.add(option);
    }
  
    // 更新Stone2下拉菜单
    stone2Dropdown.innerHTML = "";
    for (var i = 0; i < Stonelist[rowIndex][1].length; i++) {
      if (i !== stone1Dropdown.selectedIndex) {
        var option = document.createElement("option");
        option.text = Stonelist[rowIndex][1][i];

option.value = Stonelist[rowIndex][1][i];

        stone2Dropdown.add(option);
      }
    }
  
    // 更新Stone3下拉菜单
    stone3Dropdown.innerHTML = "";
    for (var i = 0; i < Stonelist[rowIndex][1].length; i++) {
      if (i !== stone1Dropdown.selectedIndex && i !== stone2Dropdown.selectedIndex+1) {
        var option = document.createElement("option");
        option.text = Stonelist[rowIndex][1][i];
        stone3Dropdown.add(option);
      }
    }

//刷新表单 favorStone1.disabled = true;

      favorStone2.disabled = true;

favorStone3.disabled = true;

      favorStone4.disabled = true;

favorStone5.disabled = true;

      favorStone6.disabled = true;
//判定   
    if (selectedHeroJob === "破军") {
      favorStone1.disabled = false;

favorStone2.disabled = false; favorStone5.disabled = false;

      favorStone6.disabled = false;
    } else if (selectedHeroJob === "神纪" || selectedHeroJob === "诡道") {

favorStone2.disabled = false; favorStone3.disabled = false; favorStone5.disabled = false;

      favorStone6.disabled = false;
    } else if (selectedHeroJob === "龙盾") {

favorStone2.disabled = false; favorStone4.disabled = false;

      favorStone5.disabled = false;
    } else if (selectedHeroJob === "岐黄") {

favorStone2.disabled = false; favorStone5.disabled = false;

    } 
  
    // 提示当前密探无法装备该星石
    if (favorStone1.disabled && favorStone1.checked) {
      alert("当前密探无法装备该星石");
      favorStone1.checked = false;
    } else if (favorStone2.disabled && favorStone2.checked) {
      alert("当前密探无法装备该星石");
      favorStone2.checked = false;
    } else if (favorStone3.disabled && favorStone3.checked) {
      alert("当前密探无法装备该星石");
      favorStone3.checked = false;
    } else if (favorStone4.disabled && favorStone4.checked) {
      alert("当前密探无法装备该星石");
      favorStone4.checked = false;
    } else if (favorStone5.disabled && favorStone5.checked) {
      alert("当前密探无法装备该星石");
      favorStone5.checked = false;
    } else if (favorStone6.disabled && favorStone6.checked) {
      alert("当前密探无法装备该星石");
      favorStone6.checked = false;
    }
  }
  // 更新复选框状态
  function updatefavorStone() {
    var stone1Dropdown = document.getElementById('Stone1');
    var stone2Dropdown = document.getElementById('Stone2');
    var stone3Dropdown = document.getElementById('Stone3');

    // 根据复选框状态设置下拉菜单选中值
    if (document.getElementById('FavorStone1').checked) {
      stone1Dropdown.value = "天府" ;
      stone2Dropdown.value = "武曲" ;
      stone3Dropdown.value = "破军" ;
    } else if (document.getElementById('FavorStone2').checked) {
      stone1Dropdown.value = "天府" ;
      stone2Dropdown.value = "七杀" ;
      stone3Dropdown.value = "太阳" ;
    } else if (document.getElementById('FavorStone3').checked) {
      stone1Dropdown.value = "天府" ;
      stone2Dropdown.value = "武曲" ;
      stone3Dropdown.value = "天机" ;
    } else if (document.getElementById('FavorStone4').checked) {
      stone1Dropdown.value = "紫薇" ;
      stone2Dropdown.value = "天相" ;
      stone3Dropdown.value = "巨门" ;
    } else if (document.getElementById('FavorStone5').checked) {
      stone1Dropdown.value = "天相" ;
      stone2Dropdown.value = "天同" ;
      stone3Dropdown.value = "天梁" ;
    } else if (document.getElementById('FavorStone6').checked) {
      stone1Dropdown.value = "破军" ;
      stone2Dropdown.value = "七杀" ;
      stone3Dropdown.value = "贪狼" ;
    }
  }

</script> <script> //存星石属性 //依次为名字 "攻击力+%" "生命值+%" 生命值+ 攻击力+ //括号里依次为1 10 10突破 20 20突破 30 30突破 40 40突破 50 50突破 60 var StoneData = [ ["等级",["1","10","10突破","20","20突破","30","30突破","40","40突破","50","50突破","60"],[],[],[]], ["天府",[0.03,0.0435,0.0485,0.0635,0.0685,0.0835,0.0885,0.1035,0.1085,0.1235,0.1285,0.1435],[],[],[]], ["天相",[],[0.03,0.0435,0.0485,0.0635,0.0685,0.0835,0.0885,0.1035,0.1085,0.1235,0.1285,0.1435],[],[]], ["巨门",[],[],[23,231,350,580,698,929,1048,1278,1396,1627,1746,1976],[]], ["太阳",[],[],[],[5,46,70,116,139,185,209,255,279,326,350,396]], ["廉贞",[],[],[16,161,244,405,487,649,733,894,976],[3,19,28,46,55,74,84,102,112,131,140,158]], ["太阴",[],[],[9,92,139,231,278,370,418,510,557,790],[3,32,48,80,96,128,145,177,194,227,244,276]], ["紫薇",[],[0.0165,0.0239,0.0267,0.035,0.0377,0.0459,0.0487,0.057,0.0597,0.0679,0.0707,0.079],[12,127,192,318,383,510,575,702,767,894,960,1086],[]], ["七杀",[0.0165,0.0239,0.0267,0.035,0.0377,0.0459,0.0487,0.057,0.0597,0.0679,0.0707,0.079],[0.0165,0.0239,0.0267,0.035,0.0377,0.0459,0.0487,0.057,0.0597,0.0679,0.0707,0.079],[],[]], ["天机",[],[],[],[6,51,76,126,151,202,229,279,306,358,384,434]], ["武曲",[],[0.0165,0.0239,0.0267,0.035,0.0377,0.0459,0.0487,0.057,0.0597,0.0679,0.0707,0.079],[],[2,25,39,64,78,103,117,143,158,184,198,223]], ["破军",[0.0165,0.0239,0.0267,0.035,0.0377,0.0459,0.0487,0.057,0.0597,0.0679,0.0707,0.079],[],[],[2,25,39,64,78,103,117,143,158,184,198,223]], ["天同",[],[],[25,253,383,636,765,1019,1151,1404,1533,1788,1920,2173],[]], ["贪狼",[],[],[],[]] ]

   function updateDropdownsLV() {

stoneLV1Dropdown.innerHTML = ""; option.text = ["1","10","10突破","20","20突破","30","30突破","40","40突破","50","50突破","60"] option.value = ["1","10","10突破","20","20突破","30","30突破","40","40突破","50","50突破","60"] stoneLV1Dropdown.add(option);

    }	 

} </script> <script>

var HeroHp =new Array()

HeroHp[90]={'葛洪':19439,'杨修':20064,'张辽':16377.714,'蔡琰':18587.571,'庞统':21635,'阿蝉':13943.571,'王异':26644.714,'史子眇':16890.714,'夏侯惇':29383.571,'张仲景':20223.571,'华佗':20421.714,'陆绩':17675.571,'陈登':18076.429,'严白虎':25339.571,'陆逊':17357.429,'吕蒙':16072.286,'孙尚香':16218.714,'郭解':28037,'孙权':29453.714,'张飞':16221.714,'小乔':18076.429,'干吉':19377.429,'张修':18959.429,'张角':16688.571,'许攸':16399.429,'许曼':15604.429,'鲁肃':19073.429,'周瑜':21030.571,'王粲':21030.571,'荀彧':22039.571,'郭嘉':18713.571,'贾诩':18891.857,'颜良':25080.714,'文丑':1502.714,'太史慈':,'太史慈':,'程昱':, } HeroAtk[90]={'葛洪':4114.857,'杨修':3985.571,'张辽':4884.571,'蔡琰':4305.571,'庞统':3700,'阿蝉':4241.429,'王异':2021.571,'史子眇':3502,'夏侯惇':2723,'张仲景':3956.286,'华佗':3918.286,'陆绩':3348.714,'陈登':3270.429,'严白虎':2334.714,'陆逊':4611.429,'吕蒙':4978,'孙尚香':4933,'郭解':2855.714,'孙权':2715.857,'张飞':4933,'小乔':3270.429,'干吉':4262.429,'张修':4210.429,'张角':4792.714,'许攸':3605,'许曼':3790.571,'鲁肃':4194.429,'周瑜':3806,'王粲':3806,'荀彧':3736.857,'郭嘉':4277.571,'贾诩':4235.571,'颜良':2360,'文丑':628.714,'太史慈':,'太史慈':, } //记录密探化极属性

var HeroHp =new Array()
// 1-1

HeroHp[1]={'葛洪':111,'杨修':115,'张辽':93,'蔡琰':111,'庞统':124,'阿蝉':80,'王异':145,'史子眇':98,'夏侯惇':169,'张仲景':116,'华佗':117,'陆绩':102,'陈登':105,'严白虎':147,'陆逊':99,'吕蒙':92,'孙尚香':93,'郭解':161,'孙权':169,'张飞':93,'小乔':105,'干吉':109,'张修':109,'张角':95,'许攸':95,'许曼':90,'鲁肃':109,'周瑜':120,'王粲':120,'荀彧':126,'郭嘉':107,'贾诩':108,'颜良':145,'文丑':81,'太史慈':93,'太史慈':93,'程昱':112 }// 1-3 HeroHp[2]={'葛洪':134,'杨修':138,'张辽':112,'蔡琰':134,'庞统':149,'阿蝉':97,'王异':174,'史子眇':117,'夏侯惇':202,'张仲景':139,'华佗':140,'陆绩':123,'陈登':126,'严白虎':176,'陆逊':119,'吕蒙':110,'孙尚香':111,'郭解':193,'孙权':203,'张飞':111,'小乔':126,'干吉':131,'张修':131,'张角':115,'许攸':114,'许曼':108,'鲁肃':131,'周瑜':144,'王粲':144,'荀彧':152,'郭嘉':128,'贾诩':130,'颜良':175,'文丑':98,'太史慈':111,'太史慈':111,'程昱':135 }// 1-5 HeroHp[3]={'葛洪':156,'杨修':161,'张辽':131,'蔡琰':156,'庞统':174,'阿蝉':113,'王异':203,'史子眇':137,'夏侯惇':236,'张仲景':162,'华佗':164,'陆绩':144,'陈登':147,'严白虎':206,'陆逊':139,'吕蒙':129,'孙尚香':130,'郭解':225,'孙权':237,'张飞':130,'小乔':147,'干吉':153,'张修':153,'张角':134,'许攸':133,'许曼':126,'鲁肃':153,'周瑜':169,'王粲':169,'荀彧':177,'郭嘉':150,'贾诩':151,'颜良':204,'文丑':114,'太史慈':130,'太史慈':130,'程昱':157, }// 2-2 HeroHp[4]={'葛洪':223,'杨修':230,'张辽':187,'蔡琰':223,'庞统':248,'阿蝉':161,'王异':291,'史子眇':196,'夏侯惇':338,'张仲景':232,'华佗':234,'陆绩':205,'陈登':210,'严白虎':294,'陆逊':199,'吕蒙':184,'孙尚香':186,'郭解':322,'孙权':338,'张飞':186,'小乔':210,'干吉':219,'张修':219,'张角':191,'许攸':190,'许曼':180,'鲁肃':219,'周瑜':241,'王粲':241,'荀彧':253,'郭嘉':214,'贾诩':216,'颜良':291,'文丑':163,'太史慈':186,'太史慈':186,'程昱':225, }// 2-4 HeroHp[5]={'葛洪':256,'杨修':264,'张辽':216,'蔡琰':256,'庞统':286,'阿蝉':186,'王异':334,'史子眇':225,'夏侯惇':388,'张仲景':267,'华佗':269,'陆绩':236,'陈登':241,'严白虎':338,'陆逊':229,'吕蒙':211,'孙尚香':213,'郭解':370,'孙权':389,'张飞':213,'小乔':241,'干吉':251,'张修':251,'张角':220,'许攸':219,'许曼':208,'鲁肃':251,'周瑜':277,'王粲':277,'荀彧':291,'郭嘉':246,'贾诩':249,'颜良':335,'文丑':187,'太史慈':213,'太史慈':213,'程昱':259, }// 3-1 HeroHp[6]={'葛洪':335,'杨修':345,'张辽':281,'蔡琰':335,'庞统':373,'阿蝉':242,'王异':436,'史子眇':294,'夏侯惇':507,'张仲景':348,'华佗':352,'陆绩':308,'陈登':315,'严白虎':442,'陆逊':299,'吕蒙':276,'孙尚香':279,'郭解':483,'孙权':508,'张飞':279,'小乔':315,'干吉':285,'张修':362,'张角':287,'许攸':285,'许曼':271,'鲁肃':328,'周瑜':362,'王粲':362,'荀彧':380,'郭嘉':322,'贾诩':325,'颜良':437,'文丑':245,'太史慈':279,'太史慈':279,'程昱':338, }// 3-3 HeroHp[7]={'葛洪':379,'杨修':391,'张辽':319,'蔡琰':379,'庞统':422,'阿蝉':275,'王异':495,'史子眇':333,'夏侯惇':574,'张仲景':394,'华佗':398,'陆绩':349,'陈登':357,'严白虎':501,'陆逊':339,'吕蒙':313,'孙尚香':319,'郭解':547,'孙权':576,'张飞':316,'小乔':357,'干吉':323,'张修':410,'张角':325,'许攸':323,'许曼':307,'鲁肃':372,'周瑜':410,'王粲':410,'荀彧':431,'郭嘉':365,'贾诩':368,'颜良':495,'文丑':277,'太史慈':316,'太史慈':316,'程昱':383, }// 3-5 HeroHp[8]={'葛洪':424,'杨修':437,'张辽':357,'蔡琰':424,'庞统':472,'阿蝉':307,'王异':553,'史子眇':372,'夏侯惇':642,'张仲景':441,'华佗':445,'陆绩':390,'陈登':399,'严白虎':560,'陆逊':379,'吕蒙':350,'孙尚香':353,'郭解':611,'孙权':644,'张飞':353,'小乔':399,'干吉':361,'张修':458,'张角':364,'许攸':361,'许曼':343,'鲁肃':416,'周瑜':458,'王粲':458,'荀彧':481,'郭嘉':408,'贾诩':412,'颜良':554,'文丑':310,'太史慈':353,'太史慈':353,'程昱':428, }// 4-2 HeroHp[9]={'葛洪':558,'杨修':575,'张辽':469,'蔡琰':558,'庞统':621,'阿蝉':404,'王异':,'史子眇':490,'夏侯惇':845,'张仲景':580,'华佗':586,'陆绩':514,'陈登':525,'严白虎':736,'陆逊':499,'吕蒙':460,'孙尚香':465,'郭解':805,'孙权':847,'张飞':465,'小乔':525,'干吉':476,'张修':547,'张角':479,'许攸':476,'许曼':452,'鲁肃':547,'周瑜':603,'王粲':603,'荀彧':633,'郭嘉':536,'贾诩':542,'颜良':729,'文丑':408,'太史慈':465,'太史慈':465,'程昱':564, }// 4-4 HeroHp[10]={'葛洪':670,'杨修':690,'张辽':563,'蔡琰':670,'庞统':746,'阿蝉':485,'王异':,'史子眇':588,'夏侯惇':1014,'张仲景':696,'华佗':704,'陆绩':617,'陈登':630,'严白虎':884,'陆逊':598,'吕蒙':552,'孙尚香':558,'郭解':966,'孙权':1016,'张飞':558,'小乔':630,'干吉':571,'张修':657,'张角':575,'许攸':571,'许曼':542,'鲁肃':657,'周瑜':724,'王粲':724,'荀彧':760,'郭嘉':644,'贾诩':650,'颜良':875,'文丑':490,'太史慈':558,'太史慈':558,'程昱':676, }

var HeroAtk =new Array()
// 1-2

HeroAtk[1]={'葛洪':23,'杨修':23,'张辽':28,'蔡琰':23,'庞统':21,'阿蝉':24,'王异':13,'史子眇':20,'夏侯惇':15,'张仲景':22,'华佗':22,'陆绩':19,'陈登':19,'严白虎':13,'陆逊':26,'吕蒙':28,'孙尚香':28,'郭解':16,'孙权':15,'张飞':28,'小乔':19,'干吉':24,'张修':24,'张角':27,'许攸':21,'许曼':22,'鲁肃':24,'周瑜':21,'王粲':21,'荀彧':21,'郭嘉':24,'贾诩':24,'颜良':13,'文丑':24,'太史慈':24,'太史慈':24,

}// 1-4

HeroAtk[2]={'葛洪':35,'杨修':34,'张辽':42,'蔡琰':35,'庞统':31,'阿蝉':37,'王异':20,'史子眇':30,'夏侯惇':23,'张仲景':34,'华佗':33,'陆绩':29,'陈登':28,'严白虎':20,'陆逊':39,'吕蒙':43,'孙尚香':42,'郭解':24,'孙权':23,'张飞':42,'小乔':28,'干吉':36,'张修':36,'张角':41,'许攸':31,'许曼':33,'鲁肃':36,'周瑜':32,'王粲':32,'荀彧':32,'郭嘉':36,'贾诩':36,'颜良':20,'文丑':36,'太史慈':36,'太史慈':36, }// 2-1 HeroAtk[3]={'葛洪':47,'杨修':46,'张辽':56,'蔡琰':47,'庞统':42,'阿蝉':49,'王异':27,'史子眇':40,'夏侯惇':31,'张仲景':45,'华佗':45,'陆绩':38,'陈登':38,'严白虎':27,'陆逊':52,'吕蒙':57,'孙尚香':56,'郭解':32,'孙权':31,'张飞':56,'小乔':38,'干吉':48,'张修':48,'张角':55,'许攸':42,'许曼':44,'鲁肃':48,'周瑜':43,'王粲':43,'荀彧':42,'郭嘉':49,'贾诩':48,'颜良':27,'文丑':48,'太史慈':48,'太史慈':48, }// 2-3 HeroAtk[4]={'葛洪':53,'杨修':51,'张辽':63,'蔡琰':53,'庞统':47,'阿蝉':55,'王异':30,'史子眇':45,'夏侯惇':35,'张仲景':51,'华佗':50,'陆绩':43,'陈登':42,'严白虎':30,'陆逊':59,'吕蒙':64,'孙尚香':63,'郭解':35,'孙权':35,'张飞':63,'小乔':42,'干吉':54,'张修':54,'张角':62,'许攸':47,'许曼':49,'鲁肃':54,'周瑜':49,'王粲':49,'荀彧':48,'郭嘉':55,'贾诩':54,'颜良':30,'文丑':55,'太史慈':54,'太史慈':54, }// 2-5 HeroAtk[5]={'葛洪':59,'杨修':57,'张辽':70,'蔡琰':59,'庞统':53,'阿蝉':61,'王异':34,'史子眇':51,'夏侯惇':39,'张仲景':56,'华佗':56,'陆绩':48,'陈登':47,'严白虎':33,'陆逊':66,'吕蒙':71,'孙尚香':71,'郭解':41,'孙权':39,'张飞':71,'小乔':47,'干吉':60,'张修':60,'张角':69,'许攸':52,'许曼':55,'鲁肃':60,'周瑜':54,'王粲':54,'荀彧':53,'郭嘉':61,'贾诩':60,'颜良':34,'文丑':61,'太史慈':60,'太史慈':60, }// 3-2 HeroAtk[6]={'葛洪':71,'杨修':69,'张辽':84,'蔡琰':71,'庞统':63,'阿蝉':74,'王异':41,'史子眇':61,'夏侯惇':46,'张仲景':68,'华佗':67,'陆绩':58,'陈登':57,'严白虎':40,'陆逊':79,'吕蒙':86,'孙尚香':85,'郭解':49,'孙权':46,'张飞':85,'小乔':57,'干吉':63,'张修':65,'张角':82,'许攸':63,'许曼':66,'鲁肃':72,'周瑜':65,'王粲':65,'荀彧':64,'郭嘉':73,'贾诩':73,'颜良':41,'文丑':73,'太史慈':73,'太史慈':73, }// 3-4 HeroAtk[7]={'葛洪':94,'杨修':92,'张辽':112,'蔡琰':94,'庞统':85,'阿蝉':98,'王异':54,'史子眇':81,'夏侯惇':62,'张仲景':91,'华佗':90,'陆绩':77,'陈登':76,'严白虎':54,'陆逊':105,'吕蒙':114,'孙尚香':113,'郭解':65,'孙权':62,'张飞':113,'小乔':76,'干吉':84,'张修':87,'张角':110,'许攸':84,'许曼':88,'鲁肃':96,'周瑜':87,'王粲':87,'荀彧':85,'郭嘉':98,'贾诩':97,'颜良':54,'文丑':97,'太史慈':97,'太史慈':97, }// 4-1 HeroAtk[8]={'葛洪':106,'杨修':103,'张辽':126,'蔡琰':106,'庞统':95,'阿蝉':111,'王异':,'史子眇':91,'夏侯惇':70,'张仲景':102,'华佗':101,'陆绩':87,'陈登':85,'严白虎':61,'陆逊':119,'吕蒙':129,'孙尚香':127,'郭解':73,'孙权':70,'张飞':127,'小乔':85,'干吉':94,'张修':108,'张角':124,'许攸':94,'许曼':99,'鲁肃':108,'周瑜':98,'王粲':98,'荀彧':96,'郭嘉':110,'贾诩':109,'颜良':61,'文丑':110,'太史慈':109,'太史慈':109, }// 4-3 HeroAtk[9]={'葛洪':118,'杨修':115,'张辽':140,'蔡琰':118,'庞统':106,'阿蝉':123,'王异':,'史子眇':102,'夏侯惇':78,'张仲景':113,'华佗':112,'陆绩':97,'陈登':95,'严白虎':67,'陆逊':132,'吕蒙':143,'孙尚香':142,'郭解':82,'孙权':78,'张飞':142,'小乔':95,'干吉':105,'张修':120,'张角':138,'许攸':105,'许曼':110,'鲁肃':120,'周瑜':109,'王粲':109,'荀彧':107,'郭嘉':123,'贾诩':121,'颜良':68,'文丑':122,'太史慈':121,'太史慈':121, }// 4-5 HeroAtk[10]={'葛洪':142,'杨修':138,'张辽':168,'蔡琰':142,'庞统':127,'阿蝉':148,'王异':,'史子眇':122,'夏侯惇':93,'张仲景':136,'华佗':135,'陆绩':116,'陈登':114,'严白虎':81,'陆逊':158,'吕蒙':172,'孙尚香':170,'郭解':98,'孙权':93,'张飞':170,'小乔':114,'干吉':126,'张修':144,'张角':165,'许攸':126,'许曼':132,'鲁肃':144,'周瑜':131,'王粲':131,'荀彧':128,'郭嘉':147,'贾诩':146,'颜良':82,'文丑':146,'太史慈':146,'太史慈':146, }

function btn_click3(){

       var now =parseInt(document.getElementById("xinzhi1").value)
       var target =parseInt(document.getElementById("xinzhi2").value)
       var sumMoney=0
       var sum=0
   for(var i=1; i<=target;i++){
       sumatk =sum+HeroAtk[i].葛洪

sumhp =sum+HeroHp[i].葛洪

       sumMoney =sumMoney+xz[i].'葛洪'
       // console.log(i,sum)
   }

document.getElementById("xz_con").innerHTML='<img src="https://patchwiki.biligame.com/images/yuan/6/68/3p56xkt83fxf53o8zgpt3ae7r9vijgo.jpg"/>攻击×'+sumatk+''

   +'<img src="https://patchwiki.biligame.com/images/yuan/0/0e/9h1d8b8wra18k6gtt7ypuhd2h56dw1e.png"/>五铢钱×'+sumhp+''
   }

</script> <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script>(function () { var t = function () { window.jQuery && window.mw ? $ready() : window.setTimeout(t, 100); }; t(); })();</script> //密探查询器

       关键字
       <input type="text" id="name">
       <button onclick="remove()" class="btn" style="width:auto;border-radius: 5px;">重置</button>
       品质
       <input type="checkbox" id="checkbox-7-1" name="pinzhi" value="绝密">
       <label for="checkbox-7-1">绝密</label>
       <input type="checkbox" id="checkbox-7-2" name="pinzhi" value="机密">
       <label for="checkbox-7-2">机密</label>
       <input type="checkbox" id="checkbox-7-3" name="pinzhi" value="隐密">
       <label for="checkbox-7-3">隐密</label>
       属性
       <input type="checkbox" id="checkbox-7-11" name="shuxing" value="地">
       <label for="checkbox-7-11"><img src="https://patchwiki.biligame.com/images/yuan/f/fd/oa5xvwclyfidtrt1qon6o9glye2lxq0.png" alt="">地</label>
       <input type="checkbox" id="checkbox-7-12" name="shuxing" value="水">
       <label for="checkbox-7-12"><img src="https://patchwiki.biligame.com/images/yuan/2/24/flwffpwgn5t326m72gpzy749727ieq0.png" alt="">水</label>
       <input type="checkbox" id="checkbox-7-13" name="shuxing" value="风">
       <label for="checkbox-7-13"><img src="https://patchwiki.biligame.com/images/yuan/4/4c/kz0y7g6bamyc704enczlszyk6m288qv.png" alt="">风</label>
       <input type="checkbox" id="checkbox-7-14" name="shuxing" value="火">
       <label for="checkbox-7-14"><img src="https://patchwiki.biligame.com/images/yuan/5/54/95u5ykui2oigny6poehqdpdoe2hbg79.png" alt="">火</label>
       <input type="checkbox" id="checkbox-7-15" name="shuxing" value="阴">
       <label for="checkbox-7-15"><img src="https://patchwiki.biligame.com/images/yuan/f/f5/nffhpp5mkh15ec24jbb7fg5cze4sqhj.png" alt="">阴</label>
       <input type="checkbox" id="checkbox-7-16" name="shuxing" value="阳">
       <label for="checkbox-7-16"><img src="https://patchwiki.biligame.com/images/yuan/d/d4/21uw6yeirox37r719uos4e0ga7l42cc.png" alt="">阳</label>
       职业
       <input type="checkbox" id="checkbox-7-21" name="zhiye" value="破军">
       <label for="checkbox-7-21">破军</label>
       <input type="checkbox" id="checkbox-7-22" name="zhiye" value="龙盾">
       <label for="checkbox-7-22">龙盾</label>
       <input type="checkbox" id="checkbox-7-23" name="zhiye" value="岐黄">
       <label for="checkbox-7-23">岐黄</label>
       <input type="checkbox" id="checkbox-7-24" name="zhiye" value="神纪">
       <label for="checkbox-7-24">神纪</label>
       <input type="checkbox" id="checkbox-7-25" name="zhiye" value="诡道">
       <label for="checkbox-7-25">诡道</label>
   <button onclick="queryData()" class="btn">查询</button>
   <button onclick="prePage()" class="btn" style="width: 100px;">上一页</button>

<button onclick="nextPage()" class="btn" style="width: 100px;">下一页</button>

查询到0密探
Loading...

<button onclick="prePage()" class="btn" style="width: 100px;">上一页</button> <button onclick="nextPage()" class="btn" style="width: 100px;">下一页</button> <html> <script type="text/javascript">

   var page=0
   function addCount(a){
       var count = new Array();
       var str ='+'
       for (var i = 0; i < a.length; i++) {
           if (a[i].checked) {    //获取复选框的状态,被选中时,该值为true
               count.push(a[i].value)
               str = count.join('||');
               //统计被选中复选框的个数
           }
       }
       return str
   }
   function queryData() {

document.getElementById("show").innerHTML = '

Loading...

' document.getElementById("number").innerHTML = '

Loading...

'

       var name = document.getElementById("name").value
       var pinzhi = document.getElementsByName("pinzhi");       
       var pinzhistr = addCount(pinzhi);
       var shuxing = document.getElementsByName("shuxing");       
       var shuxingstr = addCount(shuxing);
       var zhiye = document.getElementsByName("zhiye");       
       var zhiyestr = addCount(zhiye);
       var bumen = document.getElementsByName("bumen");       
       var bumenstr = addCount(bumen);


       var queryText = '{' + '{#ask:[' + '[关键字::~*' + name + '*]][' + '[品质::' + pinzhistr + ']][' + '[属性::' + shuxingstr + ']][' + '[职业::' + zhiyestr + ']][' + '[部门::' + bumenstr + ']]'
           + '|?品质|?属性|?职业|?标签1|?标签2|link=none|template=密探ask|headers=hide|format=template|limit=35|sort=排序,创建日期|order=asc,desc'
           +'|offset='+(page*35)+'|default=已经到最后一页啦!}}'
           $.getJSON(mw.util.wikiScript('api'), {
           format: 'json',
           action: 'parse',
           text: queryText,
           contentmodel: 'wikitext'
       }).done(function (data) {
           //console.log(data, "查询······", queryText)
           document.getElementById("show").innerHTML = data.parse.text["*"]
       });
       var queryNumber = '{' + '{#ask:[' + '[关键字::~*' + name + '*]][' + '[品质::' + pinzhistr + ']][' + '[属性::' + shuxingstr + ']][' + '[职业::' + zhiyestr + ']][' + '[部门::' + bumenstr + ']]'
           + '|format=count}}'
       $.getJSON(mw.util.wikiScript('api'), {
           format: 'json',
           action: 'parse',
           text: queryNumber,
           contentmodel: 'wikitext'
       }).done(function (data) {
           //console.log(data, "查询······")
           count = parseInt($(data.parse.text["*"]).text());
           document.getElementById("number").innerHTML = count
       });
   }
   setTimeout(function () {
       console.log("救命啊月白");
       queryData();
       // 时间间隔
   }, 2000);
   $("input").change(function () {
       queryData();
   })

//删除

function remove(){
       document.getElementById("name").value=
       var pinzhi = document.getElementsByName("pinzhi");       
       var shuxing = document.getElementsByName("shuxing");       
       var zhiye = document.getElementsByName("zhiye");     
       var bumen = document.getElementsByName("bumen");     
       for (var i = 0; i < pinzhi.length; i++) {pinzhi[i].checked=false}
       for (var i = 0; i < shuxing.length; i++) {shuxing[i].checked=false}
       for (var i = 0; i < zhiye.length; i++) {zhiye[i].checked=false}
       for (var i = 0; i < bumen.length; i++) {bumen[i].checked=false}
       queryData();
   }
   // 换页
   function prePage(){
       if(page>0){
           page=page-1
           queryData();
       }
       else{
           alert('已经是第一页啦')
       }
       console.log('上一页',page)
   }
   function nextPage(){
       page=page+1
       queryData();
       console.log('下一页',page)
   }

</script> <style>

  1. show>.mw-parser-output{

display:flex;flex-wrap: wrap;justify-content: flex-start;align-items: center; }

   input[type="checkbox"] {
       display: none;
   }
   input[type="checkbox"] {
       display: none;
   }
   [id^="checkbox-7-"]+label>span {
       position: relative;
       /* z-index: 99999; */
       font-weight: normal;
       font-size: 18px;
   }
   [id^="checkbox-7-"]+label {
       background-color: #FFF;
       padding: 4px 9px;
       border-radius: 5px;
       display: inline-block;
       position: relative;
       box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
       overflow: hidden;
       color: #464E50;
       margin: 5px 2px;
       -webkit-transition: all 0.3s linear, color 0 linear;
       transition: all 0.3s linear, color 0 linear;
   }
   [id^="checkbox-7-"]:checked+label {
       color: #fff;
   }
   [id^="checkbox-7-"]+label>span {
       position: relative;
       z-index: 99999;
   }
   [id^="checkbox-7-"]+label:before {
       content: ' ';
       position: absolute;
       background: #9c877a;
       width: 0%;
       height: 100%;
       top: 0;
       -webkit-transition: all 0.3s ease-in;
       transition: all 0.3s ease-in;
       left: 0;
   }
   [id^="checkbox-7-"]:checked+label:before {
       content: ' ';
       position: absolute;
       width: 100%;
       height: 100%;
       text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
       top: 0;
       left: 0;
   }
   .chaxun {
       margin: 20px;
       text-align: left;
   }
   .chaxun >div{
    border-bottom: 1px #ad9381 dashed;
    display:flex;
    flex-wrap:wrap;
    align-items: center;
   
   }
   .chaxun >div>span{
    font-size:20px;
    margin:0 5px;
    }
   .chaxun img{
   width: 20px;
   }
   input {
       border: 1px #ad9381 solid;
       border-radius: 10px;
       margin: 0 10px;
   }
   input {
       padding: 5px 10px;
   }
   .btn {
       border-radius: 50px;
       width: 100%;
       background: #9c877a;
       color: #fff;
       margin: 10px
   }
   #number {
       color: #673AB7;
       font-weight: bold;
       font-size: 25px;
   }
   .number {
       text-align: center;
       font-size: 20px;
   }

</style>