js实现局部刷新,我想点击按钮,执行JS,然后让页面中的某个图层刷新,可以做到吗?
------解决方案--------------------
in the script:
document.getElementById("doit").innerHTML = "what you want to change information";
in the HTML:
<div id="doit">the place where you want to change</div>
------解决方案--------------------
dwr 实现局部刷新,很简单的,一下附上我做的一些小例子。 dwr.jar 楼主可以自己到网上下个
- HTML code
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma"'