🔄 HTML Meta Refresh生成器

⚙️ 参数设置

📋 生成的代码

👁️ 倒计时预览

页面将在
5
秒后跳转

💡 使用说明

\n`; } else { meta=``; full=`\n\n\n \n \n 自动刷新页面\n\n\n

此页面每 ${delay} 秒自动刷新一次

\n
\n`; } document.getElementById('codeBox').textContent=`\n${meta}\n\n\n${full}`; } let countdownTimer=null; function startCountdown(){ if(countdownTimer) clearInterval(countdownTimer); let sec=parseInt(document.getElementById('delay').value)||5; const el=document.getElementById('countdown'); el.textContent=sec; countdownTimer=setInterval(()=>{ sec--; el.textContent=sec; if(sec<=0){clearInterval(countdownTimer);el.textContent='跳转!';showToast('✅ 倒计时完成(演示)');} },1000); } function copyCode(){ const code=document.getElementById('codeBox').textContent; navigator.clipboard.writeText(code).then(()=>showToast('✅ 代码已复制')); } updateCode();