日期:2014-05-17  浏览次数:20781 次

CSS+DIV:如何在一个盒子中点超链后让另一个盒子调入另一网页
本帖最后由 needacoder 于 2012-02-01 00:03:27 编辑 如何在一个DIV盒子中点超链后让另一个DIV盒子调入另一网页:*.html,*.asp, *.aspx等

也就是用任意静态或动态网页局部刷新页在中的某个DIV盒子

最好只用js的

ajax我根本不会
------最佳解决方案--------------------
<html>
<head>
    <title>Untitled Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK" />

    <script type="text/javascript">
        var req;
        function createXmlHttp() {
            try {
                return new XMLHttpRequest();
            } catch (e1) {
                try {
                    return new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e2) {
                    try {
                        return new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e3) {
                        return null;
                    }
                }
            }
        }
        function getPage(path) {
            req = createXmlHttp();
            if (req) {
                req.onreadystatechange = hdlRsp;
                req.open("GET", path, true);
                req.send(null);
            } else {
                alert("浏览器不支持!");
            }
        }
        function hdlRsp() {
            if (req.readyState == 4 && req.status == 200) {
             &nbs