var GoalCn = "平手,平/半,半球,半/一,一球,一/球半,球半,球半/两,两球,两/两球半,两球半,两球半/三,三球,三/三球半,三球半,三球半/四球,四球,四球/四球半,四球半,四球半/五球,五球,五球/五球半,五球半,五球半/六球,六球,六球/六球半,六球半,六球半/七球,七球,七球/七球半,七球半,七球半/八球,八球,八球/八球半,八球半,八球半/九球,九球,九球/九球半,九球半,九球半/十球,十球".split(","); function Goal2GoalCn(goal) { //数字让球转汉汉字 if (goal >= 0) return GoalCn[parseInt(goal * 4)]; else return "受让" + GoalCn[Math.abs(parseInt(goal * 4))]; } function ShowHtml(teamid) { var html = [], bgcolor = "", searchTeam = ""; var bigNum = 0, victoryNum = 0, singleNum = 0, j = 0, win1; var drawNum = 0, lossNum = 0; var win = 0, standoff = 0; var countInfo = ""; html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); html.push(""); for (var i = 0; i < a.length; i++) { var b = a[i]; if (j >= num) continue; if (kind == 1 && b[6] != teamid && b[7] != teamid) continue; if (kind == 2 && (b[6] != hometeamid && teamid == hometeamid || b[7] != guestteamid && teamid == guestteamid)) continue; if (kind == 3 && (b[6] != teamid && b[7] != teamid || b[1] != sclass)) continue; bgcolor = (bgcolor == "#FFFFFF") ? "#F4F8FF" : "#FFFFFF"; html.push(""); html.push(""); html.push(""); if (teamid == b[6]) //主场 { html.push(""); html.push(""); html.push(""); html.push(""); if (b[8] > b[9]) html.push(""); if (b[8] == b[9]) html.push(""); if (b[8] < b[9]) html.push(""); if (b[8] > b[9]) victoryNum++; if (b[8] == b[9]) drawNum++; if (b[8] < b[9]) lossNum++; html.push(""); if (b[8] - b[12] > b[9]) { html.push(""); win++; } if (b[8] - b[12] == b[9]) { html.push(""); standoff++ } if (b[8] - b[12] < b[9]) html.push(""); } else //客场 { html.push(""); html.push(""); html.push(""); html.push(""); if (b[8] < b[9]) html.push(""); if (b[8] == b[9]) html.push(""); if (b[8] > b[9]) html.push(""); if (b[8] < b[9]) victoryNum++; if (b[8] == b[9]) drawNum++; if (b[8] > b[9]) lossNum++; html.push(""); if (b[8] - b[12] < b[9]) { html.push(""); win++; } if (b[8] - b[12] == b[9]) { html.push(""); standoff++ } if (b[8] - b[12] > b[9]) html.push(""); } if (b[8] + b[9] > 2.5) { html.push(""); bigNum++; } else html.push(""); if ((b[8] + b[9]) % 2 == 1) { html.push(""); singleNum++; } else html.push(""); html.push(""); j++; if (b[6] == teamid) searchTeam = b[4]; else searchTeam = b[5]; } if (j == 0) html.push(""); html.push("
赛事时间主场球队比分客场球队半场胜负让球盘路大小单双
" + b[1] + "" + b[3] + "" + (parseInt(b[13]) > 0 ? "" + b[13] + " " : "") + "" + b[4] + "" + b[8] + "-" + b[9] + "" + (parseInt(b[14]) > 0 ? "" + b[14] + " " : "") + "" + b[5] + "" + b[10] + "-" + b[11] + "" + Goal2GoalCn(b[12]) + "" + (parseInt(b[13]) > 0 ? "" + b[13] + " " : "") + "" + b[4] + "" + b[8] + "-" + b[9] + "" + (parseInt(b[14]) > 0 ? "" + b[14] + " " : "") + "" + b[5] + "" + b[10] + "-" + b[11] + "" + Goal2GoalCn(b[12]) + "
无相关记录
"); if (j > 0) { if (j - standoff > 0) win1 = Math.round(win / (j - standoff) * 1000) / 10; else win1 = "0"; countInfo = "
" + searchTeam + "最近 " + j + " 胜率:" + Math.round(victoryNum / j * 1000) / 10 + "%和局:" + Math.round(drawNum / j * 1000) / 10 + "%输率:" + Math.round(lossNum / j * 1000) / 10 + "%让胜率:" + win1 + "% 大球:" + Math.round(bigNum / j * 1000) / 10 + "%单:" + Math.round(singleNum / j * 1000) / 10 + "%
"; } if (teamid == hometeamid) return html.join("") + countInfo; else return countInfo + html.join(""); } function select(k) { kind = k; if (kind == 1) { document.getElementById("tabid1").className = "gl_on"; document.getElementById("tabid2").className = ""; document.getElementById("tabid3").className = ""; } if (kind == 2) { document.getElementById("tabid1").className = ""; document.getElementById("tabid2").className = "gl_on"; document.getElementById("tabid3").className = ""; } if (kind == 3) { document.getElementById("tabid1").className = ""; document.getElementById("tabid2").className = ""; document.getElementById("tabid3").className = "gl_on"; } document.getElementById("league1").innerHTML = ShowHtml(hometeamid); document.getElementById("league2").innerHTML = ShowHtml(guestteamid); } function set_num(n) { document.getElementById("td" + num).className = ""; document.getElementById("td" + n).className = "kl_on"; num = n; select(kind); } function showgoallist(id) { //window.open("/detail/score_cn.html?id=" + id + "cn", "", "scrollbars=yes,resizable=yes,width=668, height=370"); window.open("/detail/score_cn.html?id=" + id + "cn"); }