JRS直播吧

实时足球比赛比分和表现统计数据

NBA 24直播网 2025-02-20 14:56:33

实时足球比赛比分和表现统计数据

欢迎来到我们的实时足球比赛比分和表现统计数据页面。在这里stats-table">球员球队进球助攻射门抢断拦截 <script> // 获取比赛数据const matches = [{id: 1,date: '2023-03-08',time: '19:00',homeTeam: {name: '皇家马德里',score: 2},awayTeam: {name: '利物浦',score: 1},stats: {shots: {home: 10,away: 5},possession: {home: 55,away: 45}},players: [{name: '卡里姆·本泽马',team: '皇家马德里',goals: 1,assists: 0,shots: 4,tackles: 2,interceptions: 1},{name: '莫哈末·萨拉赫',team: '利物浦',goals: 1,assists: 0,shots: 3,tackles: 1,interceptions: 2}]},// 更多的比赛数据...];// 按搜索过滤比赛const searchResults = matches.filter(match => {const searchTerm = document.getElementById('search-input').value.toLowerCase();return match.homeTeam.name.toLowerCase().includes(searchTerm) ||match.awayTeam.name.toLowerCase().includes(searchTerm) ||match.date.includes(searchTerm);});// 动态生成比赛行const matchesTable = document.getElementById('matches-table');searchResults.forEach(match => {constmatchRow = `${match.homeTeam.name} vs ${match.awayTeam.name}${match.homeTeam.score} - ${match.awayTeam.score}${match.time}${match.homeTeam.name}${match.awayTeam.name}查看统计数据`;matchesTable.tBodies[0].insertAdjacentHTML('beforeend', matchRow);});// 事件处理程序:显示/隐藏比赛详情document.getElementById('results').addEventListener('click', event => {if (event.target.matches('a[data-match-id]')) {const matchId = event.target.dataset.matchId;const match = matches.find(match => match.id === Number(matchId));// 显示比赛详情document.getElementById('match-details').classList.remove('visually-hidden');// 动态生成比赛摘要const matchSummary = `

日期:${match.date} | 时间:${match.time}

${match.homeTeam.name} ${match.homeTeam.score} - ${match.awayTeam.score} ${match.awayTeam.name}

`;document.getElementById('match-summary').innerHTML = matchSummary;// 动态生成球员统计行const playerStatsTable = document.getElementById('player-stats-table');match.players.forEach(player => {const playerRow = `${player.name}${player.team}${player.goals}${player.assists}${player.shots}${player.tackles}${player.interceptions}`;playerStatsTable.tBodies[0].insertAdjacentHTML('beforeend', playerRow);});}});// 事件处理程序:隐藏比赛详情document.getElementById('match-details').addEventListener('click', event => {if (event.target.matches('.close-btn')) {document.getElementById('match-details').classList.add('visually-hidden');}}); </script>

相关阅读: 实时足球比赛比分和表现统计数据

热门