步驟一:導入jquery插件
復制代碼 代碼如下:
<script type="text/javascript" src="js/easyui/jquery-1.8.0.min.js"></script>
復制代碼 代碼如下:
<label></label>
復制代碼 代碼如下:
<script type="text/javascript">
setInterval("Push()",1000*60);
function Push() {
$.ajax({
type: "POST",
url: encodeURI("crmMaintenance/crmAirpolicyAction-takeAllMonitor.action"),
success: function(data) {
$('#context').text(data);
}
});}
</script>
復制代碼 代碼如下:
public void takeAllMonitor() {
try {
HttpServletResponse response = ServletActionContext.getResponse();
PrintWriter out;
out = response.getWriter();
response.setCharacterEncoding("utf-8");
//...插入業務邏輯
out.print("Synchronous..." );
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
新聞熱點
疑難解答