我使用的是document.write
<html xmlns:v="urn:schemas-microsoft-com:vml">
<style type="text/css">
v\:* { Behavior: url(#default#VML) };
</style>
<body>
<v:RoundRect fillcolor="#fff333" arcSize="2%" style="position:relative;width:590;height:560px;"> <v:stroke color="#BFBF28"/> <v:shadow on="T" type="single" color="#C96800" offset="5px,5px"/> <v:TextBox inset="0pt,0pt,0pt,0pt">asdfsdf
</v:TextBox></v:RoundRect>
</body>
<script>
document.write('<v:RoundRect fillcolor="#fff333" arcSize="2%" style="position:relative;width:590;height:560px;"> <v:stroke color="#BFBF28"/> <v:shadow on="T" type="single" color="#C96800" offset="5px,5px"/> <v:TextBox inset="0pt,0pt,0pt,0pt">asdfsdf</v:TextBox></v:RoundRect>');
</script>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<style type="text/css">
v\:* { Behavior: url(#default#VML) };
</style>
<body>
<v:RoundRect fillcolor="#fff333" arcSize="2%" style="position:relative;width:590;height:560px;"> <v:stroke color="#BFBF28"/> <v:shadow on="T" type="single" color="#C96800" offset="5px,5px"/> <v:TextBox inset="0pt,0pt,0pt,0pt">asdfsdf
</v:TextBox></v:RoundRect>
</body>
<script>
document.write('<v:RoundRect fillcolor="#fff333" arcSize="2%" style="position:relative;width:590;height:560px;"> <v:stroke color="#BFBF28"/> <v:shadow on="T" type="single" color="#C96800" offset="5px,5px"/> <v:TextBox inset="0pt,0pt,0pt,0pt">asdfsdf</v:TextBox></v:RoundRect>');
</script>
解决方案 »
- 如何根据json的名称得到json的句柄
- 大家帮忙看下,下面两个方法哪个执行效率要高一些
- jsp ssh项目:
- document.write()
- 在打开页面时,如何获取表格右边顶点坐标值?
- 帮我看看那里出错了,谢谢了
- 同一个页面放置两个同样的样式表(但是值不同),分别用于两个对象。如何避免冲突!!
- 有劳各位先进、劳模了,activeX 调用
- 能不能實現直接拖動這個層<div><iframe src=”http://#” width=200 height=200 frameborder=0></iframe></div>?
- JS控制根据所传数据选中多选按钮
- 树型控件实现节点的拖曳
- 当按住鼠标在页面中表格上滑动时,会将表格中的内容高亮显示,即被选中了。请问有什么办法让鼠标滑动时表格中的内容不高亮显示,
不能动态生成,也不能响应事件!
我想要js生成的!
<style type="text/css">
v\:* { Behavior: url(#default#VML) };
</style>
<body>
<script>
document.write('<v:TextBox>sssssssssssssssssss</v:TextBox>');
</script>
</body>
会清除页面的所有数据;
不知道怎么避免?
就是怎样在页面上的任意一个位置添加文字?
<style type="text/css">
v\:* { Behavior: url(#default#VML) };
</style>
<body>
<div id="notextbox">no textbox here</div>
<div id="yestextbox"></div>
<script>
yestextbox.innerHTML = ('<v:TextBox>sssssssssssssssssss</v:TextBox>');
</script>
</body>
不过,我是想在已有的图(坐标系)里加文字;
我想一般的要求都是这样:
就是给已有的直线添加文字,写明起止点的坐标!
附加我的源码:
for(var i=0;i<data.length;i++)
{
var px=50+4800/data.length*i;
var newLine;
newLine=document.createElement("<v:line from='"+px+",2850' to='"+px+",2870' style='Z-INDEX:2;'></v:line>");
window.group1.insertBefore(newLine);
var newTextbox = document.createElement("<v:textbox style='FONT-SIZE:13;COLOR:#f81ad2;width:40px;height:20px' >"+(i+1)+"月"+"</v:textbox>");
newLine.insertBefore(newTextbox);
}画直线的能看到效果;
添加文字的看不到效果;
不知道该如何实现!请执教!
document和VML的坐标系不同!
如果用document,还需要转化!
topdis:要写字的位置距离上边缘的距离
m: 要写的文字或者其他内容这样就可以直接在页面写字了,而且也不会覆盖本来的东西。我现在就是用这个在画出的直线上面标号的。很好用,没有覆盖问题。