步骤一:导入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();
}
}
新闻热点
疑难解答