<p>您已提交成功!<span id='submit_second'></span></p> $("#submit_second").text(6); t1 = window.setInterval("submit_second()",1000); function submit_second() { var num = $("#submit_second").text(); num--; $("#submit_second").text(num); if(num == 0) { window.clearInterval(t1); alert("退出"); } }