请尝试此代码<div id="sample">Testing refresh every 5 seconds</div> I would take a look at this below as well, although it may not be relevant in your case.http://stackoverflow.com/questions/729921/settimeout-or-setintervalJava 脚本$(document).ready(function() { setInterval(function() { var someval = Math.floor(Math.random() * 100); $('#sample').text('Test' + someval); }, 10000); //Delay here = 10 seconds });