//定时刷新
$(document).ready(function () {
setInterval("startRequest()",10000);
//setInterval这个函数会根据后面定义的1000既每隔1秒执行一次前面那个函数
//如果你用局部刷新,要用AJAX技术
});
function startRequest()
{
var method = "shownotice";
$.ajax({
type:"POST",
url:"${root!}/punish/indexpage/shownotice",
data:{},
dataType:"json",
success:function(data)
{
if( data.state=="200" )
{
$("#myModal").text("");// 清空数据
$("#myModal").append("aaa");
}
/* else
{
*/
//} */
}
});
}
$(document).ready(function () {
setInterval("startRequest()",10000);
//setInterval这个函数会根据后面定义的1000既每隔1秒执行一次前面那个函数
//如果你用局部刷新,要用AJAX技术
});
function startRequest()
{
var method = "shownotice";
$.ajax({
type:"POST",
url:"${root!}/punish/indexpage/shownotice",
data:{},
dataType:"json",
success:function(data)
{
if( data.state=="200" )
{
$("#myModal").text("");// 清空数据
$("#myModal").append("aaa");
}
/* else
{
*/
//} */
}
});
}