].homeTeam;awayTeam.textContent = data[i].awayTeam;score.textContent = data[i].score;row.appendChild(match);row.appendChild(homeTeam);row.appendChild(awayTeam);row.appendChild(score);document.getElementById('scores').appendChild(row);}}).catch(error => {console.log(error);alert('无法获取实时比分数据。请稍后再试。');});}// Update the scores every 30 secondssetInterval(updateScores, 30000);// Call the updateScores function to populate the table initiallyupdateScores();