mark
定时刷新仪表盘页面:
在页面上,增加一段文本,需要勾选html属性。
<META HTTP-EQUIV = "REFRESH" CONTENT = "1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >
以上手段,无需确认,但是不足时,无法把提示器的值带进去重新执行查询。效果是每次都是重新打开页面。
第二种方法:
<script>
var limit="0:10";
if (document.images){
var parselimit=limit.split(":");
parselimit=parselimit[0]*60+parselimit[1]*1;
}
function beginrefresh(){
if (!document.images)
return;
if (parselimit==1)
window.location.reload();
else{
parselimit-=1;
curmin=Math.floor(parselimit/60);
cursec=parselimit%60;
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!";
else
curtime=cursec+"秒后重刷本页!";
window.status=curtime;
setTimeout("beginrefresh()",1000);
}
}
window.οnlοad=beginrefresh;
</script>
该方法,可以支持提示器的参数查询,但是每次都要手动确认,这个很不爽。
第三种,直接指定id去刷新:
原文链接:http://sites.google.com/site/technicalobiee/refresh-an-answer
In this case: HereLink('d:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n','Refresh');
</script>
<body>
<P><SPAN class=GFPCaption>Min Year</SPAN> <SPAN class=GFPControl><SELECT id=yFrom οnchange=jf_set_session_variable("YEAR_INI",value,"false"); javascript:HereLink('d:dashboard~p:7al9b092q0abnd09~r:16m0dbuj2fggkk6t','Refresh');javascript:HereLink('d:dashboard~p:7al9b092q0abnd09~r:8cekuotg338gbjum','Refresh'); name=yFrom>
<OPTION selected value=@1>@1</OPTION>
<OPTION value=2009>2009</OPTION>
<OPTION value=2010>2010</OPTION>
<OPTION value=2011>2011</OPTION>
<OPTION value=2012>2012</OPTION>
</SELECT></SPAN>
<SPAN class=GFPCaption>Max Year</SPAN> <SPAN class=GFPControl><SELECT id=yFrom οnchange=jf_set_session_variable("YEAR_FIN",value,"false");HereLink('d:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n','Refresh');javascript:HereLink('d:dashboard~p:htocnphpmvrb9omb~r:rg3pljmv9lq29gip','Refresh'); name=yFrom>
<OPTION selected value=@2>@2</OPTION>
<OPTION value=2009>2009</OPTION>
<OPTION value=2010>2010</OPTION>
<OPTION value=2011>2011</OPTION>
<OPTION value=2012>2012</OPTION>
</SELECT></SPAN> </P>
</body>