文字需要在 vml 图片之前插入.
而且不能直接 createElement("<div>文字</div>");
至于 DIV 的位置, 用其style属性控制就应该可以了.
<html xmlns:v>
<head>
<style>
v\:*{
behavior:url(#default#vml)
}
</style>
</head>
<body>
<v:group id=group1 style="WIDTH: 500pt; HEIGHT: 300pt" coordsize = "5000,3000">
<v:line from='10,10' to='2000,2000' strokeColor='blue'/>
</v:group>
</body>
</html>
<script language="javascript">
function aa(){new2=document.createElement("<div>test</div>");
new2.innerText="文字";
group1.insertBefore(new2); newoval=document.createElement("<v:oval filled='f' style='position:absolute;z-index:4;left:5;top:5;width:900;height:780'/>")
group1.insertBefore(newoval);
new1=document.createElement("<v:shape style='position:absolute;left:1229;top:2079;width:200;height:100;z-index:9'/>")
group1.insertBefore(new1);}
document.onclick=aa;
</script>
而且不能直接 createElement("<div>文字</div>");
至于 DIV 的位置, 用其style属性控制就应该可以了.
<html xmlns:v>
<head>
<style>
v\:*{
behavior:url(#default#vml)
}
</style>
</head>
<body>
<v:group id=group1 style="WIDTH: 500pt; HEIGHT: 300pt" coordsize = "5000,3000">
<v:line from='10,10' to='2000,2000' strokeColor='blue'/>
</v:group>
</body>
</html>
<script language="javascript">
function aa(){new2=document.createElement("<div>test</div>");
new2.innerText="文字";
group1.insertBefore(new2); newoval=document.createElement("<v:oval filled='f' style='position:absolute;z-index:4;left:5;top:5;width:900;height:780'/>")
group1.insertBefore(newoval);
new1=document.createElement("<v:shape style='position:absolute;left:1229;top:2079;width:200;height:100;z-index:9'/>")
group1.insertBefore(new1);}
document.onclick=aa;
</script>
解决方案 »
- jquery ligerui的ligergrid树格式怎么才能初始化数据的时候树是收缩的?
- 帮我看看怎么修改单双引号
- 求一个yyyyMMdd日期格式的正则表达式,谢谢啦
- 与服务器端实时通信问题。
- 在表单中按回车键时跳到指定的text,并将其内容选中.
- js的疑问
- 现在CSDN的API地址是多少?
- 高分在线急等,一个关于select的很菜的问题
- 在子窗口中如何访问父窗口的div中的frame的属性,或调用其方法
- 请问:我想通过右键点击表格中的某一<tr></tr>里的值,然而,每一行<tr></tr>的内容都是不一样的。
- 情人节来了,非常急着送分,如何发邮件?请诸位指点
- 用jscript如何动态显示隐藏一个select元素?
不能在里面加文字