如题。
貌似在哪看到过说是有点区别,忘记了。

解决方案 »

  1.   

    Document 不标准的,亦未见人使用,经测试
    ie直接报错,谷歌有此函数但无法调用,
    火狐浏览器可返回一个document对象(Document()或new Document()),但与页面的document对象不等,
    故猜测浏览器用其来作为document对象的构造函数,非供开发者使用
      

  2.   

    你是不是想问 Ifram框架自适应 问题呢?
    <script language="javascript">
            function SetsHeight()//自动拉伸高度
            {
                var xsun = document.getElementById("main"); //iframe id
                //var h1 = xsun.contentDocument.body.offsetHeight;
                var h2 = document.documentElement.offsetHeight;
                if (document.getElementById) {
                    if (xsun && !window.opera) {
                        if (xsun.contentDocument && h2) {
                            xsun.height = h2 + 20;
                        } else if (xsun.Document && xsun.Document.body.scrollHeight) {
                            xsun.height = h2 + 20;
                        }
                    }
                }
            }
        </script>调用方法:<iframe frameborder="0" id="main" name="main" onload="javascript:SetsHeight();"
                            src="1.html" marginwidth="0" marginheight="0" scrolling="no" style="z-index: 1; width: 100%; min-height: 300px;"></iframe>如果不是 Document 是不是你自定义的呢
      

  3.   

    document
    Document为什么要比较区别呢
      

  4.   

    是指通过IE Borowser组件来引用文档对象吗?
      

  5.   

    <!DOCTYPE html>
    <html>
    <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script>
    <script>
      alert(document instanceof Document);
    </script>
    </head>
    <body>
    <p>如果您点击我,我会消失。</p>
    <p>点击我,我会消失。</p>
    <p>也要点击我哦。</p>
    </body>
    </html>测试下,
    document是Document的实例
      

  6.   

    测试过了。在Chrome和Firefox上是true,ie上Document未定义。
      

  7.   


    测试过了。在Chrome和Firefox上是true,ie上Document未定义。ie可能不让直接访问,像__proto__