当前位置: 首页 > 资讯 > 足球资讯

310win 彩客网:一手掌握全球足球赛事实时比分

一手掌握全球足球赛事实时比分

一手掌握全球足球赛实时比分

时间 主队 比分 客队
正在加载中...
<script> (function() {// DOM元素const scoreboard = document.getElementById('scoreboard');const leagueSelect = document.getElementById('league');const refreshButton = document.getElementById('refresh-button');const loadingRow = document.querySelector('.loading');// 全局变量let matches = [];// 初始化fetchMatches();// 添加事件监听器leagueSelect.addEventListener('change', () => {fetchMatches();});refreshButton.addEventListener('click', () => {fetchMatches();});// 获取比赛数据function fetchMatches() {loadingRow.classList.remove('visually-hidden');refreshButton.classList.add('visually-hidden');const league = leagueSelect.value;const url = `${league}`;fetch(url).then(response => response.json()).then(data => {matches = data;renderMatches();}).catch(error => {console.error('Error fetching matches:', error);alert('获取比赛数据失败,请稍后再试。');}).finally(() => {loadingRow.classList.add('visually-hidden');refreshButton.classList.remove('visually-hidden');});}// 渲染比赛数据function renderMatches() {let html = '';matches.forEach(match => {html += `${match.time}${match.homeTeam}${match.homeScore} - ${match.awayScore}${match.awayTeam}`;});scoreboard.tBodies[0].innerHTML = html;} })(); </script>
录像推荐
英超德甲法甲西甲意甲NBA

首页

足球

蓝球

录像

新闻