我想制作一个java脚本,它每5秒自动循环一次我的函数这是我的代码
function showlisten() {
document.getElementById('listen').style.display = "block";
document.getElementById('review').style.display = "none";
document.getElementById('earn').style.display = "none";
document.getElementById('listen-text').style.display = "block";
document.getElementById('review-text').style.display = "none";
document.getElementById('earn-text').style.display = "none";
}
function showreview() {
document.getElementById('listen').style.display = "none";
document.getElementById('review').style.display = "block";
document.getElementById('earn').style.display = "none";
document.getElementById('listen-text').style.display = "none";
document.getElementById('review-text').style.display = "block";
document.getElementById('earn-text').style.display = "none";
}
function showearn() {
document.getElementById('listen').style.display = "none";
document.getElementById('review').style.display = "none";
document.getElementById('earn').style.display = "block";
document.getElementById('listen-text').style.display = "none";
document.getElementById('review-text').style.display = "none";
document.getElementById('earn-text').style.display = "block";
}