<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns:v = "urn:schemas-microsoft-com:vml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE>
v\:* { Behavior: url(#default#VML) }
</STYLE><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<div id=testdiv>
<v:group id="group1" style="WIDTH: 500px; POSITION: relative; HEIGHT: 300px" coordsize = "5000,3000">
<v:Rect style="Z-INDEX:6;top:2000px; left:2500px;width:2000px;height:2000px" >
<v:TextBox  inset="50px,50px,50px,50px" style="font-size: 100px;Z-INDEX:8">aafdasdfasdf </v:TextBox>
</v:Rect>
</v:group>
</div>
</BODY>
</HTML> </ v:TextBox>
-->
</v:TextBox>

解决方案 »

  1.   

    </ v:TextBox>和</ v:Rect>
    把里面的空格去掉
    </v:TextBox>和</v:Rect>
      

  2.   

    那为什麽这样写就错了!
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns:v = "urn:schemas-microsoft-com:vml"><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <STYLE>
    v\:* { Behavior: url(#default#VML) }
    </STYLE><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
    <BODY>
    <div id=testdiv>
    <v:group id="group1" style="WIDTH: 500px; POSITION: relative; HEIGHT: 300px" coordsize = "5000,3000"></v:group>
    </div><script language=javascript>
    function test()
    {
    strrect="<v:Rect    style=\"Z-INDEX:6;top:2000px; left:2500px;width:2000px;height:2000px\" ></v:Rect>"
    strtextbox="<v:TextBox  inset=\"50px,50px,50px,50px\" style=\"font-size: 100px;Z-INDEX:8\">aafdasdfasdf </v:TextBox>"
    var newrect=document.createElement(strrect);
    var newtext=document.createElement(strtextbox);  
    group1.insertBefore(newrect);
    newrect.insertBefore(newtext);
    }
    test()
    </script>
    </BODY>
    </HTML> 
    请问insertBefore的用法?以及错在那里
      

  3.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns:v = "urn:schemas-microsoft-com:vml"><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <STYLE>
    v\:* { Behavior: url(#default#VML) }
    </STYLE><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
    <BODY>
    <div id=testdiv>
    <v:group id="group1" style="WIDTH: 500px; POSITION: relative; HEIGHT: 300px" coordsize = "5000,3000"></v:group>
    </div><script language=javascript>
    function test()
    {
    strrect="<v:Rect  style=\"Z-INDEX:6;top:2000px; left:2500px;width:2000px;height:2000px\" ></v:Rect>"
    strtextbox="<v:TextBox  inset=\"50px,50px,50px,50px\" style=\"font-size: 100px;Z-INDEX:8\">aafdasdfasdf </v:TextBox>"
    var newrect=document.createElement(strrect);
    var newtext=document.createElement(strtextbox);  
    newrect.innerText="test"
    group1.insertBefore(newrect);
    newtext.innerText="Good"
    newrect.insertBefore(newtext);
    }
    test()
    </script>
    </BODY>
    </HTML> 
      

  4.   

    insertBefore MethodInserts an element into the document hierarchy as a child node of a parent object.SyntaxoElement = object.insertBefore(oNewNode [, oChildNode])
    ParametersoNewNode Required. Object that specifies the new element to be inserted into the document hierarchy. Elements can be created with the createElement method.  
    oChildNode Optional. Object that specifies the placement of the new element. If this parameter is specified, the new element will be inserted immediately before this existing child element. Return ValueReturns a reference to the element that is inserted into the document.ResDo not specify the oChildNode parameter when inserting the first child node. If children already exist and you do not specify the oChildNode parameter, the oNewNode becomes the last child of the parent object.This method is accessible at run time. If elements are removed at run time, before the closing tag has been parsed, areas of the document might not render.例子:
    <SCRIPT>
        function insertElement()
        {
            var nod=document.createElement("LI");
            oUL1.insertBefore(nod, oLIYellow);
            nod.innerText="Orange";
        }
    </SCRIPT>
    </HEAD>
    <BODY>
    <SPAN onclick=insertElement()>Click <B>HERE</B> to add an item to the following list.</SPAN>
    <UL id="oUL1">
    <LI id="oLIRed">Red</LI>
    <LI id="oLIYellow">Yellow</LI>
    <LI id="oLIBlue">Blue</LI>
    </UL>
    </BODY>