“类不能支持automation操作”是什么错误?

解决方案 »

  1.   

    try:window.frames[s].document.write(...),
      

  2.   

    var IFRAME = document.createElement('IFRAME');
    IFRAME.id = "IFRAME" + myid; //myid是一个变量
    var st = IFRAME.style;
    st.position = 'absolute';
    st.left = 0 + 'px';
    st.top = 0 + 'px';
    st.width = 90 + 'px';
    st.height = 10 + 'px';
    st.zIndex = 100;
    st.backgroundColor = "red";
    st.display="none";
    st.marginTop=0;  //我想实现marginheight="0" marginwidth="0"不知道怎么写?
    st.marginRight=0;
    st.marginBottom=0;
    st.marginLeft=0;
    st.border=0; //我想实现frameborder="0" 不知道这么写对不对?document.body.insertAdjacentElement('beforeend',IFRAME);
    var docu = window.frames["IFRAME" + myid].document;
    docu.write(TinnerHTML); //TinnerHTML是一个字符串,结果就出我上面说的提示了,怎么办?
      

  3.   

    挺好的呀<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    </head><body>
    <iframe src="about:blank" id="Myframe"></iframe>
    </body>
    </html>
    <script language="JavaScript">
    <!--
    //document.frames["Myframe"].document.write("123");
    var s = "Myframe";
    document.frames[s].document.write("123");
    //-->
    </script>
      

  4.   

    zhongmao(西风瘦马) 
    我开始以为是那个毛病,后来我也实验了,确实好用,但是也确实是那行出毛病了,提示就象我说的,请问为什么呢?
      

  5.   

    请运行这段代码就看见问题了(我的是ie5)
    <body>
    <script language="javascript">
    for (var i=0;i<10;i++)
    {
    var IFRAME = document.createElement('IFRAME');
    IFRAME.id = "IFRAME" + i; //myid是一个变量
    var st = IFRAME.style;
    st.position = 'absolute';
    st.left = 0 + 'px';
    st.top = 0 + 'px';
    st.width = 90 + 'px';
    st.height = 10 + 'px';
    st.zIndex = 100;
    st.backgroundColor = "red";
    st.display="none";
    st.marginTop=0;  //我想实现marginheight="0" marginwidth="0"不知道怎么写?
    st.marginRight=0;
    st.marginBottom=0;
    st.marginLeft=0;
    st.border=0; //我想实现frameborder="0" 不知道这么写对不对? document.body.insertAdjacentElement('beforeend',IFRAME);
    var docu = window.frames["IFRAME" + i].document;
    docu.write(i);
    };
    </script>
    </body>
      

  6.   

    window2003+ie6没有问题
    <body>
    <script language="javascript">
    for (var i=0;i<10;i++)
    {
    var IFRAME = document.createElement('IFRAME');
    IFRAME.id = "IFRAME" + i; //myid是一个变量
    var st = IFRAME.style;
    st.position = 'absolute';
    st.left = 90 * i + 'px';
    st.top = 0 + 'px';
    st.width = 90 + 'px';
    st.height = 100 + 'px';
    st.zIndex = 100;
    st.backgroundColor = "red";
    //st.display="none";
    st.marginTop=0;  //我想实现marginheight="0" marginwidth="0"不知道怎么写?
    st.marginRight=0;
    st.marginBottom=0;
    st.marginLeft=0;
    st.border=0; //我想实现frameborder="0" 不知道这么写对不对? document.body.insertAdjacentElement('beforeend',IFRAME);
    var docu = window.frames["IFRAME" + i].document;
    docu.write(i);
    };
    </script>
    </body>
      

  7.   

    那你看怎么办?append的语法怎么写?
      

  8.   

    2000+ie6也不行,但是不出错误,就是象死循环一样的效果,我把
    IFRAME.id = "IFRAME" + i;改成 "IFRAME" 
    var docu = window.frames["IFRAME" + i].document;改成var docu = window.frames["IFRAME"].document;
    在2000+ie6下就好了,也不知道为什么?
      

  9.   

    createElement在IE4.0上仅仅可以用于新建 img , area , option 。在IE5.0上你可以用于新建除了 frame 和 iframe 以外的所有对象类型。append的语法怎么写?
    oElement = object . appendChild ( oNode )
      

  10.   

    insertAdjacentElement和appenChild都适用于ie5+(ie5+ 包括ie5)
      

  11.   

    也就是说我的办法在根上就是错误的了?
    根本创建不了iframe?
    document.body.appendChild(obj);可以这么写吧?
      

  12.   

    也就是说我的办法在根上就是错误的了?
    根本创建不了iframe?ie5下不行document.body.appendChild(obj);可以这么写吧?
    语法没错,但是对你解决这个问题没用,这个地方不是关键
      

  13.   

    那就知道了。但是我现在做的是一个无限级的菜单,我以前不怎么写前台,现在终于写出来了,发现ie5下面div叫iframe给档住了,没有办法想用iframe代替DIV,可谁知道又有这个问题!真郁闷!
    叫用户们都升级到ie6是不是很过分呢?
      

  14.   

    发现你的代码中display设的是none,所以在页面上根本就显示不出来,而这时进度条还在走,看起来是个死循环的情况,一开始我也以为我浏览器死了你看看是不是这个原因按照常规来说,这段代码没有错误的
      

  15.   

    还有,你的10个iframe中的left值重合了
      

  16.   

    LxcJie(肖冲),就算写成循环1次也不行的,也不知道为什么。
      

  17.   

    because the IFRAME doesn't load completely
      

  18.   

    try my code in IE, it pass in windows2000 IE5 document.body.insertAdjacentElement('beforeend',IFRAME);
    IFRAME.outerHTML = IFRAME.outerHTML;
      

  19.   

    哦?试试这段代码,是zhongmao(西风瘦马) ( )的,我这里可以显示正常,just try<body>
    <script language="javascript">
    for (var i=0;i<10;i++)
    {
    var IFRAME = document.createElement('IFRAME');
    IFRAME.id = "IFRAME" + i; //myid是一个变量
    var st = IFRAME.style;
    st.position = 'absolute';
    st.left = 90 * i + 'px';
    st.top = 0 + 'px';
    st.width = 90 + 'px';
    st.height = 100 + 'px';
    st.zIndex = 100;
    st.backgroundColor = "red";
    //st.display="none";
    st.marginTop=0;  //我想实现marginheight="0" marginwidth="0"不知道怎么写?
    st.marginRight=0;
    st.marginBottom=0;
    st.marginLeft=0;
    st.border=0; //我想实现frameborder="0" 不知道这么写对不对? document.body.insertAdjacentElement('beforeend',IFRAME);
    var docu = window.frames["IFRAME" + i].document;
    docu.write(i);
    };
    </script>
    </body>
      

  20.   

    I see it before in my application, no error appears in IE6, but IE5.
      

  21.   

    我实验了fason(Forbes Pu) 的方法,现在不报错了!但是进度条一直都不消失!怎么办?为什么?
    还有,怎么用甲苯实现以下的功能:
    1、iframe的marginwidth=0
    2、iframe的marginheight=0
    3、frameborder=0
    4、开始的饿时候iframe定义的可能很小,怎么让他的大小被里面的元素给撑起来,就象DIV被撑起来一样。
    谢谢,谢谢了!!!
      

  22.   

    1, object.marginHeight
    2, object.marginWidth
    3, object.frameBorder
      

  23.   

    还有,就是怎样才能没有滚动条。
    最最重要的是:开始的时候iframe定义的可能很小,怎么让他的大小被里面的元素给撑起来,就象DIV被撑起来一样。
      

  24.   

    IFRAME.scrolling = no;
    在iframe载入的页面上写入
    <body onload='parent.iframeId.width=document.body.scrollWidth;parent.iframeId.height=document.body.scrollHeight'>
      

  25.   

    var docu = window.frames["IFRAME" + i].document;
    docu.open();
    docu.write(i);
    docu.close();
      

  26.   

    prentice1001说的那样,果然不会出现象死循环那样的情况了,感谢。
      

  27.   

    <body>
    <script language="javascript">
    for (var m=0;m<10;m++)
    {
    var IFRAME = document.createElement('IFRAME');
    IFRAME.id = "IFRAME" + m;
    var st = IFRAME.style;
    st.position = 'absolute';
    st.left = 0 + 'px';
    st.top = 0 + 'px';
    st.width = 90 + 'px';
    st.height = 100 + 'px';
    st.zIndex = 100;
    st.backgroundColor = "red"; document.body.insertAdjacentElement('beforeend',IFRAME);
    IFRAME.outerHTML = IFRAME.outerHTML;
    var docu = window.frames["IFRAME" + m].document;
    docu.open();
    docu.write("<body onload='alert(parent."+"IFRAME" + m +".id)'></body>");
    docu.close();
    }
    </script>
    </body>
    为什么弹出来的是undefined呢?