VML实例及两个网站

把下面两个实例复制出来,然后保存成htm格式就OK了。你就可以通过IE访问它,看到效果了。
vml相关的两个站点:
http://www.vmlmaker.com/gallery/visio/basic_flowchart.htm
http://www.itlearner.com/code/vml/step3.html
======================例一 ================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>Visio-Basic Flowchart.vsd</title>
<!-- Generated by VMLmaker Version 1.00.1113 -->
<!-- JAN-13-2001, 03:08 -->
<style>
v/:* { behavior: url(#default#VML); }
</style>
<script>
 function DrawBar(NavElementTop){
  var s = "";
  var vRect = new VRect(NavElementTop);
  vRect.fillcolor = "red";
  vRect.appendThis();
  vRect.appendVTextBox("公文拟稿");
  var vRect1 = new VRect(NavElementTop)
  vRect1.style_top = 50;
  vRect1.style_zindex = 1;
  vRect1.appendThis();
  

  var vPLine = new VPolyLine(NavElementTop);
  vPLine.style_zindex = 0;
  vPLine.point[vPLine.point.length] = "5,5";
  vPLine.point[vPLine.point.length] = "500,500";
  vPLine.point[vPLine.point.length] = "100,200";
  vPLine.point[vPLine.point.length] = "100,800";
  vPLine.appendThis();
 }

 function VRect(ParentElement){
  this.ParentElement = ParentElement;
  this.position = "absolute";
  this.style_width = 100;
  this.style_height = 100;
  this.style_top = 100;
  this.style_left = 100;
  this.style_zindex = 2;  
  this.fillcolor = "blue";  
  this.oThis;
  this.appendThis = VRectAppendThis;
  this.appendVTextBox = VRectAppendVTextBox;
 }

 function VRectAppendThis(){
  var myRect = document.createElement("v:Rect");
  var R = this.ParentElement.appendChild(myRect);
  R.style.position = this.position;
  R.style.width = this.style_width;
  R.style.height = this.style_height;
  R.style.top = this.style_top;
  R.style.left = this.style_left;
  R.style.zIndex = this.style_zindex;
  R.fillcolor = this.fillcolor;
  R.strokeweight = "2pt";
  R.stroke.dashstyle = "dashdot"
  this.oThis = R;
 }

 function VRectAppendVTextBox(textValue){
  var myTextBox = document.createElement("v:TextBox");
  var R = this.oThis.appendChild(myTextBox);
  R.innerText = textValue;
 }

 function VPolyLine(ParentElement){
  this.ParentElement = ParentElement;
  this.point = new Array();
  this.position = "absolute";
  this.style_width = 100;
  this.style_height = 100;
  this.style_top = 100;
  this.style_left = 100;
  this.style_zindex = 2;
  this.endArrow = "Classic";
  this.dashstyle = "Dot";

  this.appendThis = VPolyLineAppendThis;

 }

 function VPolyLineAppendThis(){
  var sPoint = "";
  if(this.point.length>1){
   for(var i=0;i<this.point.length;i++)
    sPoint += (sPoint=="")?this.point[i]:" "+this.point[i];
   var myPolyLine = document.createElement("v:polyline");
   var R = this.ParentElement.appendChild(myPolyLine);
   R.filled = true;
   R.points.value = sPoint;
   R.style.position = this.position;
   R.style.zIndex = this.style_zindex;
   R.stroke.EndArrow = this.endArrow;
   R.stroke.dashstyle = this.dashstyle;
   alert(R.points.value)
  }
 }

 function init(){
  DrawBar(document.all.VW_NAVTOP);
  with (document.body) {
   onclick = _onclick;
  }
 }

 function _onclick(){
  alert("abc");
 }
</script>
</HEAD>
<BODY οnlοad="init();">
<div id="VW_NAVTOP"></div>
<div id="VW_TABLE"></div>
<div id="VW_NAVBOTTOM"></div>

<v:polyline id="mypolyline"
   points="10pt,10pt 100pt,100pt">
   </v:polyline>

</BODY>
</HTML>
========================例二=================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.sjzxdl.com/fyw/flashvml/history/FYWVML3.htm -->
<HTML xmlns:v><HEAD><TITLE>Vml画板(FYMVml)3.0</TITLE>
<META http-equiv=Content-Type content="text/html; Charset=gb2312">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<META content=Vml画板(FYMVml)3.0 name=KEYWORDS>
<STYLE>v/:* {
 BEHAVIOR: url(#default#VML)
}
A {
 COLOR: white; TEXT-DECORATION: none
}
A:hover {
 COLOR: yellow; TEXT-DECORATION: underline
}
TD {
 FONT-SIZE: 12px; COLOR: white
}
.bon1 {
 BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 54px; CURSOR: hand; COLOR: yellow; BORDER-BOTTOM: #eeeeee 1px solid; BACKGROUND-COLOR: #619ce7
}
.bon2 {
 BORDER-RIGHT: gray 1px solid; BORDER-TOP: #eeeeee 1px solid; BORDER-LEFT: #eeeeee 1px solid; WIDTH: 54px; CURSOR: hand; COLOR: white; BORDER-BOTTOM: gray 1px solid; BACKGROUND-COLOR: #619ce7
}
</STYLE>
</HEAD>
<BODY οncοntextmenu='if(event.srcElement.tagName!="TEXTAREA")return false'
onselectstart='if(event.srcElement.tagName!="TEXTAREA"&amp;&amp;event.srcElement.tagName!="INPUT")return false'
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 0px; BORDER-LEFT: 0px; CURSOR: default; BORDER-BOTTOM: 0px"
onhelp="fywvmlhelp.click();return false" vLink=#3732cd link=#3732cd>
<SCRIPT>
if(screen.width<1024||screen.height<768){alert('本程序只支持在大于1024*768显示器分辨率的环境下工作,检测您的显示器分辨率低于这个数值,请在[控制面板--显示]中调整分辨率为1024*768或大于这个分辨率,而后在刷新本页,即可使用');document.body.style.display='none'}
var xx=0,yy=0,moveok=0,onloadstr="<script>/n//本函数为所有使用旋转功能的物件更新视图/nfunction window.onload(){try{for(i=0;i<xuanzhuan.length;i++)xuanzhuan[i].Rotation=xuanzhuan[i].xuanzhuanstr;xuanzhuan.Rotation=xuanzhuan.xuanzhuanstr}catch(e){}};;;/script>"
function window.onerror(){return true}
</SCRIPT>
<v:Line id=line1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute" from =
"0,0" to = "0,0">
<!--直线可视化-->
<v:Stroke dashstyle = "shortDash"></v:Stroke></v:Line>
<v:arc id=arc1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute" startangle = "300"
endangle = "0" coordsize = "21600,21600" adj = ",,5400">
<!--弧型可视化-->
<v:Stroke joinstyle = "miter" dashstyle = "shortDash"></v:Stroke></v:arc>
<v:Oval id=oval1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute" coordsize =
"21600,21600">
<!--圆型可视化-->
<v:Stroke dashstyle = "shortDash"></v:Stroke></v:Oval>
<v:rect id=rect1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute" coordsize = "21600,21600">
<!--长方型可视化-->
<v:Stroke dashstyle = "shortDash"></v:Stroke></v:rect>
<v:roundrect id=roundrect1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute" arcsize = "4321f" coordsize = "21600,21600">
<!--圆锯型可视化-->
<v:Stroke dashstyle = "shortDash"></v:Stroke></v:roundrect>

<SPAN id=wenzi1 style="DISPLAY: none; FONT-SIZE: 12px; Z-INDEX: 2000; POSITION: absolute">
<!--插入文字可视化-->
<TEXTAREA id=txt1 style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 300px; BORDER-BOTTOM: black 1px solid; HEIGHT: 100px"></TEXTAREA><BR>

<CENTER>字体:

<SELECT id=wenziziti style="WIDTH: 100px" οnchange=gengxinwenzi.click()>
  <SCRIPT>var zitistr="<option selected>宋体<option>黑体<option>隶书<option>幼圆<option>楷体_GB2312<option>仿宋_GB2312<option>华文中宋<option>华文行楷<option>华文新魏<option>华文细黑<option>华文彩云<option>方正姚体<option>方正舒体<option>Wingdings<option>Wingdings 2<option>Wingdings 3<option>Webdings<option>System<option>@宋体<option>@黑体<option>@隶书<option>@幼圆<option>@楷体_GB2312<option>@仿宋_GB2312<option>@华文中宋<option>@华文行楷<option>@华文新魏<option>@华文细黑<option>@华文彩云<option>@方正姚体<option>@方正舒体<option>@System";document.write(zitistr)</SCRIPT>
</SELECT>

有无边框<INPUT id=wenzibiankuang type=checkbox> 背景透明<INPUT id=beijingtouming type=checkbox CHECKED><BR>颜色:<INPUT οnmοusemοve=gengxinwenzi.click() οnmοusedοwn=rndcolor(this.id) id=wenziyanse
style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 50px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px" value=#000000> 背景:<INPUT οnmοusemοve=gengxinwenzi.click()
οnmοusedοwn=rndcolor(this.id) id=wenzibeijing
style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 50px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
value=#FFFFFF> 大小:<SELECT id=wenzidaxiao style="WIDTH: 50px"
οnchange=gengxinwenzi.click()><OPTION selected>12
  <SCRIPT>var temp101="";for(i=1;i<101;i++){temp101+="<option>"+i;}document.write(temp101)</SCRIPT>
  </OPTION></SELECT><BR><INPUT class=bon2 id=gengxinwenzi οnclick=txt1.style.color=wenziyanse.value;txt1.style.backgroundColor=wenzibeijing.value;txt1.style.fontSize=wenzidaxiao.options[wenzidaxiao.selectedIndex].text;txt1.style.fontFamily=wenziziti.options[wenziziti.selectedIndex].text; type=button value=浏览更新><INPUT class=bon2 οnclick=charuwenzi() type=button value=插入><INPUT class=bon2 οnclick="wenzi1.style.display='none'" type=button value=取消>
</SPAN>

<SPAN id=tupian1
style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute"><!--插入图片可视化--><INPUT
id=file1 style="WIDTH: 400px" type=file><BR>
<CENTER><SELECT id=duibi><OPTION selected>默认对比度
  <SCRIPT>document.write(temp101)</SCRIPT>
  </OPTION></SELECT><SELECT id=secai><OPTION selected>默认色彩度
  <SCRIPT>temp1="";for(i=0;i<9.9;i+=0.1){temp1+="<option>"+new Number(i).toFixed(1)}document.write(temp1)</SCRIPT>
  <OPTION>10</OPTION></SELECT><SELECT id=liangdu><OPTION selected>默认亮度
  <SCRIPT>temp1="";for(i=-0.5;i<0.6;i+=0.1){temp1+="<option>"+new Number(i).toFixed(1)};document.write(temp1)</SCRIPT>
  </OPTION></SELECT><INPUT id=heibai
οnclick=duibi.disabled=this.checked;secai.disabled=this.checked;liangdu.disabled=this.checked
type=checkbox><LABEL for=heibai>黑白效果</LABEL><BR><INPUT class=bon2 οnclick=charutupian() type=button value=插入><INPUT class=bon2 οnclick="tupian1.style.display='none'" type=button value=取消>
</SPAN>

<SPAN id=gaoji1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute"><!--改源码改可视化--><TEXTAREA id=txt2 style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 400px; BORDER-BOTTOM: black 1px solid; HEIGHT: 150px"></TEXTAREA><BR>
<CENTER><INPUT class=bon2 οnclick="gaojiobj.outerHTML=txt2.value;gaojiobj=null;gaoji1.style.display='none'" type=button value=修改><INPUT class=bon2 οnclick='gaoji1.style.display="none"' type=button value=取消>
</SPAN>

<SPAN id=yuandaima
style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute"><!--所有原代码--><TEXTAREA id=txt3 style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 600px; BORDER-BOTTOM: black 1px solid; HEIGHT: 400px"></TEXTAREA><BR>
<CENTER><INPUT class=bon2 οnclick="window.clipboardData.setData('text',txt3.value);alert('已将数据复制到系统剪切板')" type=button value=复制>
<INPUT class=bon2 οnclick="div1.innerHTML=txt3.value;yuandaima.style.display='none'" type=button value=更新修改>
<INPUT class=bon2 οnclick="yuandaima.style.display='none'" type=button value=取消>
</SPAN>

<SPAN id=menu1 style="DISPLAY: none; Z-INDEX: 2000; POSITION: absolute"><!--弹出菜单--><INPUT class=bon2 οnclick='zz+=1;thisobj.style.zIndex=zz;menu1.style.display="none"' type=button value=置前><BR><INPUT class=bon2 οnclick='zz2-=1;thisobj.style.zIndex=zz2;menu1.style.display="none"' type=button value=置后><BR><INPUT class=bon2 id=fuzhi οnclick='div1.innerHTML+=thisobj.outerHTML;alert("复制完成,请使用选移功能拖动");menu1.style.display="none";for(i=0;i<huabi.length;i++)huabi[i].className="bon2";huabi[10].className="bon1";' type=button value=复制><BR><INPUT class=bon2 id=shanchu style="BORDER-BOTTOM: navy 3px solid" οnclick='thisobj.outerHTML="";menu1.style.display="none"' type=button value=删除><BR><INPUT class=bon2 οnmοusemοve='showhelp("放大单个图型对象,对钢笔和记忆点2无效")' οnclick='fangda(thisobj);menu1.style.display="none"' type=button value=放大><BR><INPUT class=bon2 οnmοusemοve='showhelp("缩小单个图型对象,对钢笔和记忆点2无效")' οnclick='suoxiao(thisobj);menu1.style.display="none"' type=button value=缩小><BR><INPUT class=bon2 οnmοusemοve='showhelp("增加Css滤镜的fliph的左右反转效果")' οnclick='thisobj.style.filter+="fliph ";menu1.style.display="none"' type=button value=反转><BR><INPUT class=bon2 οnmοusemοve='showhelp("增加Css滤镜的flipy的上下颠倒效果")' style="BORDER-BOTTOM: navy 3px solid" οnclick='thisobj.style.filter+="flipv ";menu1.style.display="none"' type=button value=颠倒><BR><INPUT class=bon2 style="BACKGROUND-COLOR: gray" οnclick='menu1.style.display="none"' type=button value=取消>
</SPAN>

<IFRAME id=web style="DISPLAY: none" src="about:blank"></IFRAME><!--实现保存-->
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
  <TR>
    <TD>
      <DIV id=div1
      style="WIDTH: 100%; CURSOR: crosshair; COLOR: black; HEIGHT: 100%; BACKGROUND-COLOR: #eeeeee"></DIV></TD></TR></TBODY></TABLE>
<TABLE οnmοuseup='moveok=0;releaseCapture();if(parseInt(this.style.top)<0){alert("工具栏高度不能低于页面最顶部");this.style.top=1}'
οnmοusemοve=if(moveok==1){this.style.left=event.x-xx;this.style.top=event.y-yy;}
οnmοusedοwn='if(event.srcElement.tagName=="CENTER"&amp;&amp;event.button==1){moveok=1;setCapture();xx=event.x-this.offsetLeft;yy=event.y-this.offsetTop;}'
style="; LEFT: expression(document.body.offsetWidth/2-(this.offsetWidth/2)); POSITION: absolute; TOP: 1px"
cellSpacing=0 cellPadding=0 align=center bgColor=#619ce7>
  <TBODY>
  <TR>
    <TD
    style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px">
      <CENTER style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">画图工具</CENTER></TD>
    <TD style="BORDER-LEFT: white 1px solid">
      <CENTER
style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">图型编辑</CENTER></TD></TR>
  <TR>
    <TD style="BORDER-RIGHT: gray 1px solid"><BUTTON class=bon2
      οnmοusemοve='showhelp("本功能尚不完善,也许在运行时其X、Y坐标不正确")' id=huabi>铅笔</BUTTON><BUTTON
      class=bon1 οnmοusemοve='showhelp("选择后,按住鼠标左键在画板内移动光标即可")'
      id=huabi>直线</BUTTON><BUTTON class=bon2
      οnmοusemοve='showhelp("选择后,以点击鼠标左键的方式决定每条线的路径")' id=huabi>记忆线<BUTTON
      class=bon2 id=huabi>圆型</BUTTON><BUTTON class=bon2 id=huabi>长方型</BUTTON><BR><BUTTON
      class=bon2 id=huabi>圆矩型</BUTTON><BUTTON class=bon2
      οnmοusemοve='showhelp("调整弧度,请使用[改源码]功能修改其startangle、endangle属性或使用旋转更改弧缺即可")'
      id=huabi>弧型<BUTTON class=bon2
      οnmοusemοve='showhelp("选择后,在画板内单击鼠标左键即在目标位置插入文字")' id=huabi>文字<BUTTON
      class=bon2 οnmοusemοve='showhelp("支持HTTP协议的网上资源")'
      id=huabi>图片</BUTTON><BUTTON class=bon2
      οnmοusemοve='showhelp("绘制由FYWVml提供了几种固有图型")' id=huabi>高级图型</BUTTON> </TD>
    <TD style="BORDER-LEFT: white 1px solid"><BUTTON class=bon2
      οnmοusemοve='showhelp("选择后,左键按住画板内需要移动的图形,而后移动鼠标即可")' id=huabi>选移<BUTTON
      class=bon2 id=huabi>调大小<BUTTON class=bon2
      οnmοusemοve='showhelp("不支持放大[线条]一类的图型")' id=huabi>放大<BUTTON class=bon2
      οnmοusemοve='showhelp("不支持缩小[线条]一类的图型")' id=huabi>缩小<BUTTON class=bon2
      id=huabi>阴影<BUTTON class=bon2
      οnmοusemοve='showhelp("同样可以在次定义画笔的粗度,甚至去掉边框")'
      id=huabi>边框</BUTTON><BR><BUTTON class=bon2
      οnmοusemοve='showhelp("[线条、图片、文字]不支持填充")' id=huabi>填充<BUTTON class=bon2
      οnmοusemοve='showhelp("[图片、文字]不支持立体")' id=huabi>立体<BUTTON class=bon2
      οnmοusemοve='showhelp("可以设置目标透明度、透明效果、是否空心")' id=huabi>透明度<BUTTON
      class=bon2 οnmοusemοve='showhelp("以文字充当目标图型的边框")' id=huabi>文字化<BUTTON
      class=bon2
      οnmοusemοve='showhelp("旋转幅度可单独依据鼠标左右、上下移动控制,<b>注意:</b>Rotation旋转效果在运行时必须由脚本控制")'
      id=huabi>旋转<BUTTON class=bon2
      οnmοusemοve='showhelp("高级功能,可以查看或直接修改目标图形的VML源代码")' id=huabi>改源码</BUTTON>
    </TD>
  <TR></TR></TBODY></TABLE>
<TABLE
οnmοuseup='moveok=0;releaseCapture();if(parseInt(this.style.top)<-10){alert("工具栏高度不能低于页面最顶部");this.style.top=1}'
οnmοusemοve=if(moveok==1){this.style.left=event.x-xx;this.style.top=event.y-yy;}
οnmοusedοwn='if(event.srcElement.tagName=="CENTER"&amp;&amp;event.button==1){moveok=1;setCapture();xx=event.x-this.offsetLeft;yy=event.y-this.offsetTop;}'
style="; LEFT: expression(document.body.offsetWidth-this.offsetWidth-20); POSITION: absolute; TOP: 1px"
cellSpacing=0 cellPadding=3 align=center bgColor=#619ce7>
  <TBODY>
  <TR>
    <TD>
      <CENTER
  style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">画笔基本设置</CENTER></TD></TR>
  <TR>
    <TD>笔边粗度 <SELECT id=bibiancudu style="WIDTH: 54px"><OPTION selected>1
        <SCRIPT>temp1="";for(i=2;i<101;i++){temp1+="<option>"+i}document.write(temp1)</SCRIPT>
        </OPTION></SELECT><BR>画笔颜色 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=huabiyanse
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#000000><BR>画笔背景 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=huabibeijing
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#FFFFFF><BR>X Y 坐标 <INPUT id=zuobiao
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      disabled value=0,0><BR>网页背景 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=wangyebeijing οnkeyup=div1.style.backgroundColor=this.value;
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#EEEEEE><BR>图像标题 <INPUT id=tuxiangbiaoti
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=吾之画>
  
   <SPAN id=huxing1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">弧型基本参数</CENTER><BR>360°起点
      <SELECT id=yuanqueqidian style="WIDTH: 54px"
      οnchange=arc1.startangle=this.options[this.selectedIndex].text><OPTION
        selected>300
        <SCRIPT>temp1="";for(i=-360;i<370;i+=10){temp1+="<option>"+i}document.write(temp1)</SCRIPT>
        </OPTION></SELECT><BR>360°终点 <SELECT id=yuanquezhongdian
      style="WIDTH: 54px"
      οnchange=arc1.endangle=this.options[this.selectedIndex].text><OPTION
        selected>0
        <SCRIPT>temp1="";for(i=-360;i<370;i+=10){temp1+="<option>"+i}document.write(temp1)</SCRIPT>
        </OPTION></SELECT> </SPAN>
  <SPAN id=tianchong1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">填充基本参数</CENTER><BR>普通背景
      <INPUT οnmοusedοwn=rndcolor(this.id) id=tianchongbeijing
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"><BR>使用渐变背景<INPUT
      id=usejianbian type=checkbox><BR>上下渐变 <INPUT type=radio CHECKED
      name=jianbianyangshi><BR>斜向渐变 <INPUT type=radio
      name=jianbianyangshi><BR>渐变色一 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=jianbianse1
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 55px; COLOR: red; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#FF0000><BR>渐变色二 <INPUT οnmοusedοwn=rndcolor(this.id) id=jianbianse2
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 55px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#FFFFFF> </SPAN>
  
   <SPAN id=liti1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">立体基本参数</CENTER><BR>后向伸展
      <SELECT id=houxiangshenzhan style="WIDTH: 54px"><OPTION selected>20
        <SCRIPT>temp1="";for(i=0;i<101;i++){temp1+="<option>"+i}document.write(temp1)</SCRIPT>
        </OPTION></SELECT><BR>前向伸展 <SELECT id=qianxiangshenzhan
      style="WIDTH: 54px"><OPTION selected>0
        <SCRIPT>document.write(temp101)</SCRIPT>
        </OPTION></SELECT><BR>偏移左边 <SELECT id=pianyizuobian
        style="WIDTH: 54px"><OPTION selected>0
        <SCRIPT>document.write(temp101)</SCRIPT>
        </OPTION></SELECT><BR>偏移上边 <SELECT id=pianyishangbian
        style="WIDTH: 54px"><OPTION selected>0
        <SCRIPT>document.write(temp101)</SCRIPT>
        </OPTION></SELECT><BR>立体颜色 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=litiyanse
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"><BR></SPAN>
  
   <SPAN id=biankuang1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">边框基本参数</CENTER><BR>边框粗度
      <SELECT id=biankuangcudu style="WIDTH: 54px">
        <SCRIPT>temp1="";for(i=0;i<101;i++){if(i!=1)temp1+="<option>"+i;else temp1+="<option selected>"+i}document.write(temp1)</SCRIPT>
      </SELECT><BR>边框样式 <SELECT id=biankuangyangshi
        style="WIDTH: 54px"><OPTION
        selected>none<OPTION>dash<OPTION>dashdot<OPTION>dot<OPTION>longdash<OPTION>longdashdot<OPTION>shortdash<OPTION>shortdashdot<OPTION>shortdashdotdot<OPTION>longdashdotdot<OPTION>shortdot</OPTION></SELECT><BR>起点尖头
      <SELECT id=qidianjiantou style="WIDTH: 54px"><OPTION
        selected>none<OPTION>block<OPTION>classic<OPTION>diamond<OPTION>open<OPTION>oval</OPTION></SELECT><BR>终点尖头
      <SELECT id=zhongdianjiantou style="WIDTH: 54px"><OPTION
        selected>none<OPTION>block<OPTION>classic<OPTION>diamond<OPTION>open<OPTION>oval</OPTION></SELECT><BR>边框颜色
      <INPUT οnmοusedοwn=rndcolor(this.id) id=biankuangyanse
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"><BR></SPAN>
  
   <SPAN
      id=yinying1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">阴影基本参数</CENTER><BR>左右偏移
      <SELECT id=zuoyoupianyi style="WIDTH: 54px">
        <SCRIPT>temp1="";for(i=-50;i<51;i++){if(i!=5)temp1+=("<option>"+i);else temp1+=("<option selected>"+i)}document.write(temp1)</SCRIPT>
      </SELECT><BR>上下偏移 <SELECT id=shangxiapianyi style="WIDTH: 54px">
        <SCRIPT>temp1="";for(i=-50;i<51;i++){if(i!=5)temp1+=("<option>"+i);else temp1+=("<option selected>"+i)}document.write(temp1)</SCRIPT>
      </SELECT><BR>阴影颜色 <INPUT οnmοusedοwn=rndcolor(this.id) id=yinyingyanse
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"><BR></SPAN>
  
   <SPAN
      id=touming1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">透明度设置</CENTER><BR>图形透明度<INPUT
      type=radio CHECKED name=bantouming><BR>透明系数 <SELECT id=toumingxishu
      style="WIDTH: 54px">
        <SCRIPT>temp1="";for(i=0;i<101;i++){if(i!=50)temp1+=("<option>"+i);else temp1+=("<option selected>"+i)}document.write(temp1)</SCRIPT>
      </SELECT><BR>透明样式 <SELECT id=toumingyangshi style="WIDTH: 54px"><OPTION
        value=0 selected>淡化所有<OPTION value=1>左右渐淡<OPTION value=2>圆型渐淡<OPTION
        value=3>矩型渐淡</OPTION></SELECT><BR>完全空心化<INPUT type=radio name=bantouming>
      </SPAN>
  
   <SPAN id=fangdasuoxiao1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">放大与缩小</CENTER><BR>按照规则
      <SELECT id=anzhaoguize style="WIDTH: 54px"><OPTION
        style="BACKGROUND-COLOR: #dddddd" selected>按照像素<OPTION value=2>2分之1
        <SCRIPT>temp1="";for(i=3;i<11;i++){temp1+=("<option value='"+i+"'>"+i+"分之1");}document.write(temp1)</SCRIPT>
        </OPTION></SELECT><BR>按照像素 <SELECT id=anzhaoxiangsu style="WIDTH: 54px">
        <SCRIPT>temp1="";for(i=5;i<105;i+=5){if(i!=20)temp1+=("<option>"+i);else temp1+=("<option selected>"+i)}document.write(temp1)</SCRIPT>
      </SELECT><BR></SPAN>
  
   <SPAN id=wenzihua1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">文字化基本设置</CENTER><BR>文字大小
      <SELECT id=wenzidaxiao2 style="WIDTH: 54px"><OPTION selected>50
        <SCRIPT>document.write(temp101)</SCRIPT>
        </OPTION></SELECT><BR>文字颜色 <INPUT οnmοusedοwn=rndcolor(this.id)
      id=wenziyanse2
      style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 54px; BORDER-BOTTOM: black 1px solid; HEIGHT: 17px"
      value=#000000><BR>字体 <SELECT id=ziti2 style="WIDTH: 80px">
        <SCRIPT>document.write(zitistr)</SCRIPT>
      </SELECT><BR></SPAN>
  
   <SPAN id=gaojituxing1 style="DISPLAY: none"><BR>
      <CENTER
      style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">选择一种高级图形</CENTER><BR>三角型
      <INPUT type=radio CHECKED name=xuanzetuxing><BR>四角型 <INPUT type=radio
      name=xuanzetuxing><BR>五角星 <INPUT type=radio name=xuanzetuxing><BR>六角型
      <INPUT type=radio name=xuanzetuxing><BR>十字架 <INPUT type=radio
      name=xuanzetuxing><BR>交叉线 <INPUT type=radio
    name=xuanzetuxing><BR></SPAN>
 
 </TD></TR>
  <TR>
    <TD>
      <CENTER
style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">全局操作</CENTER></TD></TR>
  <TR>
    <TD><INPUT class=bon2 οnmοusemοve='showhelp("快捷键Ctrl+Z")' id=chexiaock οnclick="if(youbiao>0){div1.innerHTML=chexiao[youbiao];youbiao-=1;fanchexiao1=2}" type=button value=撤消><INPUT class=bon2 οnmοusemοve='showhelp("快捷键Ctrl+Y")' id=fanchexiaock οnclick="if(youbiao<chexiao.length-fanchexiao1){youbiao+=fanchexiao1;fanchexiao1=1;div1.innerHTML=chexiao[youbiao];}else if(chexiao.length-youbiao==1&amp;&amp;youbiao>0){div1.innerHTML=zuizhongxingtai}" type=button value=反撤消><BR><INPUT class=bon2 οnmοusemοve='showhelp("快捷键Ctrl+↑")' id=fangda οnclick="for(i=0;i<div1.all.length;i++){try{fangda(div1.all[i])}catch(e){}}" type=button value=放大><INPUT class=bon2 οnmοusemοve='showhelp("快捷键Ctrl+↓")' id=suoxiao οnclick="for(i=0;i<div1.all.length;i++){try{suoxiao(div1.all[i])}catch(e){}}" type=button value=缩小><BR><INPUT class=bon2 οnmοusemοve='showhelp("快捷键←")' id=zuoyi οnclick="for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)-10;}catch(e){}}" type=button value=左移><INPUT class=bon2 οnmοusemοve='showhelp("快捷键→")' id=youyi οnclick="for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)+10;}catch(e){}}" type=button value=右移><BR><INPUT class=bon2 οnmοusemοve='showhelp("快捷键↑")' id=shangyi οnclick="for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)-10;}catch(e){}}" type=button value=上移><INPUT class=bon2 οnmοusemοve='showhelp("快捷键↓")' id=xiayi οnclick="for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)+10;}catch(e){}}" type=button value=下移><BR><INPUT class=bon2 οnmοusemοve='showhelp("快捷键回车键")' id=shiyunxing οnclick='win1=window.open("","lshdic1");win1.document.open();win1.document.write("<HTML xmlns:v>/n<HEAD>/n<META http-equiv=Content-Type content=text/html;charset=gb2312>/n<TITLE>"+tuxiangbiaoti.value+"</TITLE>/n<META name=Gemeratpr content=Vml画板(FYMVml)3.0>/n<META name=GemeratprHomePage content=http://www.lshdic.com>/n<STYLE>/nv//:*{behavior:url(#default#VML);}/n</STYLE>/n</HEAD>/n<BODY bgcolor="+wangyebeijing.value+">/n"+onloadstr.replace(";;;","<")+"/n"+div1.innerHTML+"/n</BODY>/n</HTML>");win1.document.close();win1.moveTo(0,0);win1.resizeTo(screen.availWidth,screen.availHeight)' type=button value=试运行><INPUT class=bon2 οnmοusemοve='showhelp("快捷键ESC")' id=esc οnclick='savechexiao();div1.innerHTML="";poly1=null;thisobj=null;' type=button value=全部清除>
    </TD></TR>
  <TR>
    <TD>
      <CENTER
style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%">系统功能</CENTER></TD></TR>
  <TR>
    <TD><INPUT class=bon2 οnmοusemοve='showhelp("把已保存的VML代码粘贴修改实现打开,或者手写修改当前编辑器内的所有VML代码")' style="WIDTH: 110px" οnclick="yuandaima.x=event.x;yuandaima.y=event.y;txt3.value='<!--This is Project Use The FYWVml3.0-->/n'+div1.innerHTML.replace(/>/g,'>/n').replace(/ = /g,'=').replace(//: /g,':').replace(//; /g,';');yuandaima.style.display==''?yuandaima.style.display='none':yuandaima.style.display=''" type=button value=查看及修改源码><BR><INPUT class=bon2 οnmοusemοve='showhelp("将编辑器图型保存为后缀为htm的文件,注意保存时请使用Unicode保存")' style="WIDTH: 110px" οnclick="web.document.clear();web.document.open();web.document.write('<HTML xmlns:v>/n<HEAD>/n<META http-equiv=Content-Type content=text/html;charset=gb2312>/n<TITLE>'+tuxiangbiaoti.value+'</TITLE>/n<META name=Gemeratpr content=Vml画板(FYMVml)3.0>/n<META name=GemeratprHomePage content=http://www.lshdic.com>/n<STYLE>/nv//:*{behavior:url(#default#VML);}/n</STYLE>/n</HEAD>/n<BODY bgcolor='+wangyebeijing.value+'>/n'+onloadstr.replace(';;;','<')+'/n'+div1.innerHTML+'/n</BODY>/n</HTML>');web.document.execCommand('SaveAs',false,tuxiangbiaoti.value)" type=button value=保存为文件><BR><INPUT class=bon2 οnmοusemοve='showhelp("打开FYWVml的帮助文件")' id=fywvmlhelp style="WIDTH: 110px" οnclick='window.open("fywvmlhelp/fywvmlhelp.htm")' type=button value=FYWVml帮助手册><BR>
      <CENTER style="WIDTH: 100%; CURSOR: move; HEIGHT: 100%"><A
      οnmοusemοve='showhelp("访问原作者FYW(风云舞)的主页")' href="http://www.lshdic.com/"
      target=_target value="Original author">原作者:FYW</A>
</CENTER></TD></TR></TBODY></TABLE>

<TABLE id=colortab
style="DISPLAY: none; Z-INDEX: 3000; WIDTH: 100px; POSITION: absolute; HEIGHT: 100px; BACKGROUND-COLOR: red"
cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TD id=colorid></TD></TR></TBODY></TABLE>
<SCRIPT language=jscript>
var bi=4    //定义当前使用的画笔工具,3为铅笔
var bitext=""   //定义当前使用的画笔工具的名称,用以判断
var color1='#000000',color2='#000000',size1=0  //定义缺剩的画笔颜色及画笔填充颜色和笔边粗度
var xx=0,yy=0,zz=1000  //定义缺剩的X及Y坐标
var isok=false  //区分画笔起点是否在DIV内,超出范围则无效
var moveobj=null,ckleft=0,cktop=0,ckwid=0,ckhei=0,ckto=""  //被移动物件、调整大小物件的引用
var poly1=null,oldvalue="",oldx=0,oldy=0  //为了完成记忆点,创建一个可折式线段
var gaojiobj=null  //为了完成“高级”功能,绑定被修改对象
var thisobj=null   //为了完成各种基本编辑功能,如“置前”“复制”“删除”等
var zz2=1000          //为完成“置后”功能,zz2为负数
var huxingtixing=false  //如果为false则ALERT()提醒弧型使用高级修改,否则不提醒
var chexiao=new Array(),youbiao=0,fanchexiao1=2  //定义一个存储撤消内容的数组以及位移游标,fanchexiao1为0时+2,否则+1
var zuizhongxingtai=""   //定义反撤消的最终形态

function div1.onmousedown(){
 colortab.style.display="none"  //关闭颜色对话框
 div1.setCapture();  //画笔绘画开始,锁定鼠标
 color1=huabiyanse.value  //定义画笔基本颜色
 color2=huabibeijing.value;  //定义画笔背景颜色
 isok=true;
 size1=bibiancudu.options[bibiancudu.selectedIndex].text  //定义画笔基本粗度
 xx=event.x;yy=event.y;zz+=1  //定义基本起始坐标
 for(i=0;i<huabi.length;i++){if(huabi[i].className=="bon1"){bi=i;bitext=huabi[i].innerText;break}}  //找到选择了哪个画笔
 line1.strokecolor=color1;line1.strokeweight=size1;oval1.strokeweight=size1;oval1.strokecolor=color1   //设置可视化物件的基本样式
 oval1.fillcolor=color2;rect1.strokeweight=size1;rect1.strokecolor=color1
 rect1.fillcolor=color2;roundrect1.strokeweight=size1;roundrect1.strokecolor=color1
 roundrect1.fillcolor=color2;arc1.strokeweight=size1;arc1.strokecolor=color1
 arc1.fillcolor=color2;
 if(event.button==1){
 switch(bitext){
 case "选移":  //选移
 if(event.srcElement.parentElement.id=="div1"){moveobj=event.srcElement;ckleft=xx-parseInt(moveobj.style.left);cktop=yy-parseInt(moveobj.style.top)}
 break;
 case "调大小":  //调大小
 if(event.srcElement.parentElement.id=="div1"){
 if(event.srcElement.tagName.toLowerCase()=="polyline"||event.srcElement.tagName=="SPAN"){alert('无法对polyline线段和span文字进行大小调整!如果对象为polyline线段,请用改源码功能调整其points=""属性值,如果是span文字,请用改源码功能调整其font-size:属性值');return false}
 moveobj=event.srcElement;
 ckleft=parseInt(moveobj.style.left);cktop=parseInt(moveobj.style.top);ckwid=moveobj.offsetWidth;ckhei=moveobj.offsetHeight}
 break;
 case "弧型":  //弧型
 arc1.style.left=event.x;arc1.style.top=event.y;arc1.style.width=0;arc1.style.height=0;arc1.style.display="";
 break;
 case "直线":  //直线
 line1.style.left=event.x;line1.style.top=event.y;line1.to="0,0";line1.style.display=""
 break;
 case "铅笔":  //铅笔
 if(poly1==null&&event.button==1){
 oldx=xx;oldy=yy
 poly1=div1.appendChild(document.createElement("<v:polyline filled='false' points='0px,0px' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
 }
 oldvalue=poly1.points.value
 case "圆型":  //圆型
 oval1.style.left=event.x;oval1.style.top=event.y;oval1.style.width=0;oval1.style.height=0;oval1.style.display=""
 break;
 case "长方型":  //长方型
 rect1.style.left=event.x;rect1.style.top=event.y;rect1.style.width=0;rect1.style.height=0;rect1.style.display=""
 break;
 case "圆矩型":  //圆矩型
 roundrect1.style.left=event.x;roundrect1.style.top=event.y;roundrect1.style.width=0;roundrect1.style.height=0;roundrect1.style.display=""
 break;
 case "文字":  //文字
 wenzi1.style.left=event.x;wenzi1.style.top=event.y;wenzi1.style.display=""
 break;
 case "图片":  //图片
 tupian1.style.left=event.x;tupian1.style.top=event.y;tupian1.style.display=""
 break;
 case "记忆线":  //记忆线
 oldx=xx;oldy=yy
 poly1=div1.appendChild(document.createElement("<v:line to='0,0' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>"))
 break;
 case "旋转": //旋转
 if(event.srcElement.parentElement.id=="div1"){moveobj=event.srcElement;event.srcElement.id="xuanzhuan";}
 break;
 case "高级图型":  //高级图型
 if(xuanzetuxing[0].checked==true){  //绘制三角形
 moveobj=document.createElement("<v:Polyline points='60 60 90 0 120 60 60 60' style='position:absolute;z-index:"+zz+";left:"+(xx-60)+";top:"+(yy-60)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>")
 div1.appendChild(moveobj);oldx=60;oldy=60}
 if(xuanzetuxing[1].checked==true){  //绘制四角形
 moveobj=document.createElement("<v:Polyline points='100 50 150 0 200 50 150 100 100 50' style='position:absolute;z-index:"+zz+";left:"+(xx-100)+";top:"+(yy-50)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>")
 div1.appendChild(moveobj);oldx=100;oldy=50}
 if(xuanzetuxing[2].checked==true){  //绘制五角星
 moveobj=document.createElement("<v:Polyline points='40 40 85 45 95 0 105 45 150 40 110 64 135 110 96 75 60 110 82 65 40 40' style='position:absolute;z-index:"+zz+";left:"+(xx-40)+";top:"+(yy-40)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>")
 div1.appendChild(moveobj);oldx=40;oldy=40}
 if(xuanzetuxing[3].checked==true){  //绘制六角型
 moveobj=document.createElement("<v:Polyline points='40 40 60 20 100 20 120 40 120 80 100 100 60 100 40 80 40 40' style='position:absolute;z-index:"+zz+";left:"+(xx-40)+";top:"+(yy-40)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>")
 div1.appendChild(moveobj);oldx=40;oldy=40}
 if(xuanzetuxing[4].checked==true){  //绘制十字架
 div1.insertAdjacentHTML("beforeEnd","<v:line to='80,0' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/><v:line to='0,80' style='position:absolute;z-index:"+(zz+1)+";left:"+(xx+40)+";top:"+(yy-40)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>");zz+=1}
 if(xuanzetuxing[5].checked==true){  //绘制交叉线
 div1.insertAdjacentHTML("beforeEnd","<v:line to='60,60' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/><v:line to='60,-60' style='position:absolute;z-index:"+(zz+1)+";left:"+xx+";top:"+(yy+60)+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>");zz+=1}
 break;
 }
 }
}

function div1.onmousemove(){
tempx=event.x;tempy=event.y;temp1=0;temp2=0
zuobiao.value=tempx+","+tempy
if(bitext=="铅笔"&&poly1!=null&&event.button==1){   //铅笔
oldvalue=oldvalue+","+(tempx-oldx)+","+(tempy-oldy);poly1.points.value=oldvalue
}else if(bitext=="记忆线"&&poly1!=null){   //记忆线
poly1.to=(tempx-xx)+","+(tempy-yy)
}
if(event.button==1){
switch(bitext){
case "选移":  //选移
if(moveobj!=null){moveobj.style.left=tempx-ckleft;moveobj.style.top=tempy-cktop}
break;
case "调大小":  //调大小
if(moveobj!=null){
if(moveobj.tagName!="line"){
if(tempx>ckleft){moveobj.style.width=tempx-ckleft}else{moveobj.style.left=tempx;moveobj.style.width=ckleft-tempx}
if(tempy>cktop){moveobj.style.height=tempy-cktop}else{moveobj.style.top=tempy;moveobj.style.height=cktop-tempy}
}else{moveobj.to=parseInt(tempx-ckleft)+","+parseInt(tempy-cktop);if(ckto=="")ckto=parseInt(tempx-ckleft)+","+parseInt(tempy-cktop);}
}
break;
case "弧型":  //弧型
if(tempx-xx<0){arc1.style.left=tempx;arc1.style.width=(xx-tempx)}else{arc1.style.width=(tempx-xx)}
if(tempy-yy<0){arc1.style.top=tempy;arc1.style.height=(yy-tempy)}else{arc1.style.height=(tempy-yy)}
break;
case "直线":  //直线
line1.to=(tempx-xx)+","+(tempy-yy)
break;
case "圆型":  //圆型
if(tempx-xx<0){oval1.style.left=tempx;oval1.style.width=(xx-tempx)}else{oval1.style.width=(tempx-xx)}
if(tempy-yy<0){oval1.style.top=tempy;oval1.style.height=(yy-tempy)}else{oval1.style.height=(tempy-yy)}
break;
case "长方型":  //长方型
if(tempx-xx<0){rect1.style.left=tempx;rect1.style.width=(xx-tempx)}else{rect1.style.width=(tempx-xx)}
if(tempy-yy<0){rect1.style.top=tempy;rect1.style.height=(yy-tempy)}else{rect1.style.height=(tempy-yy)}
break;
case "圆矩型":  //圆矩型
if(tempx-xx<0){roundrect1.style.left=tempx;roundrect1.style.width=(xx-tempx)}else{roundrect1.style.width=(tempx-xx)}
if(tempy-yy<0){roundrect1.style.top=tempy;roundrect1.style.height=(yy-tempy)}else{roundrect1.style.height=(tempy-yy)}
break;
case "旋转":  //旋转
if(moveobj!=null){moveobj.Rotation=(tempx+tempy)/2}
break;
case "高级图型":  //高级图型
if(moveobj!=null){moveobj.style.left=tempx-oldx;moveobj.style.top=tempy-oldy;}
break;
}}}
function div1.onmouseup(){
savechexiao()
document.releaseCapture();if(isok==false){forerr();return false};isok=false;menu1.style.display='none'
tempx=event.x;tempy=event.y;divwid=div1.offsetWidth;divhei=div1.offsetHeight
if(tempx>document.body.offsetWidth){forerr();return alert("X坐标越界")}
if(tempy>document.body.offsetHeight){forerr();return alert("Y坐标越界")}
if(bitext=="铅笔"&&poly1!=null){
poly1.points.value=oldvalue;oldvalue="";poly1=null;
}else if(event.srcElement.parentElement.id=="div1"&&event.button==2&&poly1==null){menu1.style.left=tempx;menu1.style.top=tempy;menu1.style.display='';thisobj=event.srcElement}
else if(event.button==2&&bitext=="记忆线"&&poly1!=null){
poly1.outerHTML="";poly1=null
}
if(event.button==1){
switch(bitext){
case "选移":  //选移
if(moveobj!=null&&parseInt(moveobj.style.left)<0&&moveobj.tagName!="polyline"){forerr();return alert("被移动物体X1超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.left)+moveobj.offsetWidth-2>document.body.offsetWidth){forerr();return alert("被移动物体X2超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.top)<0&&moveobj.tagName!="polyline"){forerr();return alert("被移动物体Y1超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.top)+moveobj.offsetHeight-2>document.body.offsetHeight&&moveobj.tagName!="polyline"){forerr();return alert("被移动物体Y2超出界限")}
moveobj=null
break;
case "调大小":  //调大小
moveobj=null;ckto=""
break;
case "弧型":  //弧型
arc1.style.display='none';
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:arc startangle='"+yuanqueqidian.options[yuanqueqidian.selectedIndex].text+"' endangle='"+yuanquezhongdian.options[yuanquezhongdian.selectedIndex].text+"' style='position:absolute;z-index:"+zz+";left:"+arc1.style.left+";top:"+arc1.style.top+";width:"+arc1.style.width+";height:"+arc1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
if(huxingtixing==false){huxingtixing=true;alert("弧型已绘出,调整弧度 startangle='' endangle='' 请使用“改源码”功能或使用旋转功能更改弧缺")}
break;
case "直线":  //直线
line1.style.display="none"
if (Math.abs(tempx-xx)<=2&&Math.abs(tempy-yy)<=2)return false
div1.appendChild(document.createElement("<v:line style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' to='"+(event.x-xx)+","+(event.y-yy)+"' strokecolor='"+color1+"' strokeweight='"+size1+"'/>"))
break;
case "圆型":  //圆型
oval1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:oval style='position:absolute;z-index:"+zz+";left:"+oval1.style.left+";top:"+oval1.style.top+";width:"+oval1.style.width+";height:"+oval1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case "长方型":  //长方型
rect1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:rect style='position:absolute;z-index:"+zz+";left:"+rect1.style.left+";top:"+rect1.style.top+";width:"+rect1.style.width+";height:"+rect1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case "圆矩型":  //圆矩型
roundrect1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:roundrect style='position:absolute;z-index:"+zz+";left:"+roundrect1.style.left+";top:"+roundrect1.style.top+";width:"+roundrect1.style.width+";height:"+roundrect1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case "填充":  //填充
if(event.srcElement.parentElement.id=="div1"){
if(!usejianbian.checked){event.srcElement.fillcolor=tianchongbeijing.value}else{
temp1=jianbianyangshi[0].checked?'gradient':'gradientradial'
temp2=event.srcElement.innerHTML.replace(/<v/:fill .*<//v:fill>/gi,'')
event.srcElement.innerHTML=temp2+"<v:fill color='"+jianbianse2.value+"' color2='"+jianbianse1.value+"' type='"+temp1+"'/>"
}}
break;
case "立体":  //立体
if(event.srcElement.parentElement.id=="div1"){
temp2=event.srcElement.innerHTML.replace(/<v/:extrusion .*<//v:extrusion>/gi,'')
event.srcElement.innerHTML=temp2+"<v:Extrusion on='t' color='"+litiyanse.value+"' backdepth='"+houxiangshenzhan.options[houxiangshenzhan.selectedIndex].text+"' foredepth='"+qianxiangshenzhan.options[qianxiangshenzhan.selectedIndex].text+"' rotationangle='"+pianyishangbian.options[pianyishangbian.selectedIndex].text+","+pianyizuobian.options[pianyizuobian.selectedIndex].text+"'/>"
}
break;
case "边框":  //边框
if(event.srcElement.parentElement.id=="div1"){
temp2=event.srcElement.innerHTML.replace(/<v/:stroke .*<//v:stroke>/gi,'')
event.srcElement.innerHTML=temp2+"<v:Stroke dashstyle='"+biankuangyangshi.options[biankuangyangshi.selectedIndex].text+"' startarrow='"+qidianjiantou.options[qidianjiantou.selectedIndex].text+"' endarrow='"+zhongdianjiantou.options[zhongdianjiantou.selectedIndex].text+"'/>"
event.srcElement.strokecolor=biankuangyanse.value
biankuangcudu.options[biankuangcudu.selectedIndex].text=='0'?event.srcElement.stroked=false:event.srcElement.strokeweight=biankuangcudu.options[biankuangcudu.selectedIndex].text
}
break;
case "改源码":  //改源码
if(event.srcElement.parentElement.id=="div1"){
gaojiobj=event.srcElement
txt2.value=event.srcElement.outerHTML.replace(/>/g,">/n").replace(/ = /g,"=").replace(//: /g,":").replace(//; /g,";");gaoji1.style.left=event.x;gaoji1.style.top=event.y;gaoji1.style.display=''
}
break;
case "文字化":  //文字化
if(event.srcElement.parentElement.id=="div1"){
str1=prompt("请输入一段用于图型轨迹填充的文字(如果您的VML插件版本过低,中文可能无法显示)","")
if(!str1)return false;if(str1=='')return false
if(str1.indexOf("'")!=-1)return alert("输入的文字中不可含有违禁符号 ' 单引号")
temp2=event.srcElement.innerHTML.replace(/<v/:path .*<//v:path>/gi,'').replace(/<v/:textpath .*<//v:textpath>/gi,'')
event.srcElement.innerHTML=temp2+"<v:fill on='true' color='"+wenziyanse2.value+"'/><v:path textpathok='True'/>/n<v:textpath on='True' style='font-size:"+wenzidaxiao2.options[wenzidaxiao2.selectedIndex].text+"px;font-family:"+ziti2.options[ziti2.selectedIndex].text+";' string='"+str1+"'/>"
}
break;
case "阴影":  //阴影
if(event.srcElement.parentElement.id=="div1"){
temp2=event.srcElement.innerHTML.replace(/<v/:shadow .*<//v:shadow>/gi,'')
event.srcElement.innerHTML=temp2+"<v:shadow offset='"+zuoyoupianyi.options[zuoyoupianyi.selectedIndex].text+"px,"+shangxiapianyi.options[shangxiapianyi.selectedIndex].text+"px' color='"+yinyingyanse.value+"' on='true'/>"
}
break;
case "透明度":  //透明度
if(event.srcElement.parentElement.id=="div1"){
if(bantouming(0).checked==true){
event.srcElement.filled=true
event.srcElement.style.filter="alpha(opacity="+toumingxishu.options[toumingxishu.selectedIndex].text+",style="+toumingyangshi.options[toumingyangshi.selectedIndex].value+")"
}else{event.srcElement.style.filter="";event.srcElement.filled=false}
}
break;
case "放大":  //放大
if(event.srcElement.parentElement.id=="div1")fangda(event.srcElement)
break;
case "缩小":  //缩小
if(event.srcElement.parentElement.id=="div1")suoxiao(event.srcElement)
break;
case "旋转":  //旋转
if(moveobj!=null)moveobj.xuanzhuanstr=(tempx+tempy)/2;
moveobj=null
break;
case "高级图型":  //旋转
moveobj=null;oldx=0;oldy=0
break;
}zuizhongxingtai=div1.innerHTML}}
function fangda(tempElement){  //放大函数
if(tempElement.tagName=="line"||tempElement.tagName.toLowerCase()=="polyline"||tempElement.tagName=="SPAN")return false
if(anzhaoguize.selectedIndex==0){
thes1=parseInt(anzhaoxiangsu.options[anzhaoxiangsu.selectedIndex].text);thes2=thes1/2
tempElement.style.left=parseInt(tempElement.style.left)-thes2;
tempElement.style.top=parseInt(tempElement.style.top)-thes2;
tempElement.style.width=parseInt(tempElement.style.width)+thes1;
tempElement.style.height=parseInt(tempElement.style.height)+thes1
}else{
thes1=parseInt(anzhaoguize.options[anzhaoguize.selectedIndex].value);
thewidth=parseInt(tempElement.style.width);theheight=parseInt(tempElement.style.height)
tempElement.style.left=parseInt(tempElement.style.left)-(thewidth/thes1/2);
tempElement.style.top=parseInt(tempElement.style.top)-(theheight/thes1/2);
tempElement.style.width=thewidth+(thewidth/thes1);
tempElement.style.height=theheight+(theheight/thes1)
}}
function suoxiao(tempElement){  //缩小函数
if(tempElement.tagName=="line"||tempElement.tagName.toLowerCase()=="polyline"||tempElement.tagName=="SPAN")return false
if(anzhaoguize.selectedIndex==0){
thes1=parseInt(anzhaoxiangsu.options[anzhaoxiangsu.selectedIndex].text);thes2=thes1/2
tempElement.style.left=parseInt(tempElement.style.left)+thes2;
tempElement.style.top=parseInt(tempElement.style.top)+thes2;
tempElement.style.width=parseInt(tempElement.style.width)-thes1;
tempElement.style.height=parseInt(tempElement.style.height)-thes1
}else{
thes1=parseInt(anzhaoguize.options[anzhaoguize.selectedIndex].value);
thewidth=parseInt(tempElement.style.width);theheight=parseInt(tempElement.style.height)
tempElement.style.left=parseInt(tempElement.style.left)+(thewidth/thes1/2);
tempElement.style.top=parseInt(tempElement.style.top)+(theheight/thes1/2);
tempElement.style.width=thewidth-(thewidth/thes1);
tempElement.style.height=theheight-(theheight/thes1)
}}
function savechexiao(){
youbiao+=1;chexiao[youbiao]=div1.innerHTML;
}
function rndcolor(theobjis){
colortab.style.display="";colorid.innerHTML="";str1="<table cellspacing=0 cellpadding=0>";
colortab.style.left=event.x-100;colortab.style.top=event.y+event.srcElement.offsetHeight+15;
for(r=0;r<10;r++){str1+="<tr>"
for(i=0;i<10;i++){
tempcolor1=Math.round(Math.random()*255).toString(16)+Math.round(Math.random()*255).toString(16)+Math.round(Math.random()*255).toString(16);while(tempcolor1.length<6){tempcolor1+=Math.round(Math.random()*9)}
str1+="<td style='width:10;height:10;background-color:#"+tempcolor1+";' οnclick="+theobjis+".value='#"+tempcolor1+"';"+theobjis+".style.color='#"+tempcolor1+"';colortab.style.display='none';div1.style.backgroundColor=document.all('wangyebeijing').value;document.all('wangyebeijing').style.color='black'></td>"
}str1+="</tr>"}
colorid.innerHTML=str1+"<tr><td colspan=20 align=center οnclick=colortab.style.display='none' style='cursor:hand'>Close(关闭)</td></tr></table>"
}
function document.onmouseup(){
if(event.srcElement.tagName=="BUTTON"&&event.button==1){

event.srcElement.blur();if(event.srcElement.className=="bon1")return true;
for(i=0;i<huabi.length;i++)huabi[i].className="bon2"
event.srcElement.className="bon1";
bitext=event.srcElement.innerText

bitext=="高级图型"?gaojituxing1.style.display='':gaojituxing1.style.display='none'
bitext=="弧型"?huxing1.style.display='':huxing1.style.display='none'
bitext=="放大"||bitext=="缩小"?fangdasuoxiao1.style.display='':fangdasuoxiao1.style.display='none'
bitext=="文字化"?wenzihua1.style.display='':wenzihua1.style.display='none'
if(bitext=="填充"){tianchong1.style.display='';tianchongbeijing.value=tianchongbeijing.value==''?huabibeijing.value:tianchongbeijing.value}else{tianchong1.style.display='none';}
if(bitext=="立体"){liti1.style.display='';litiyanse.value=litiyanse.value==''?huabibeijing.value:litiyanse.value}else{liti1.style.display='none';}
if(bitext=="边框"){biankuang1.style.display='';biankuangyanse.value=biankuangyanse.value==''?huabiyanse.value:biankuangyanse.value}else{biankuang1.style.display='none';}
if(bitext=="阴影"){yinying1.style.display='';yinyingyanse.value=yinyingyanse.value==''?huabiyanse.value:yinyingyanse.value}else{yinying1.style.display='none';}
if(bitext=="透明度"){touming1.style.display='';}else{touming1.style.display='none';}
if(poly1!=null){   //清除记忆点
if(poly1.tagName.toLowerCase()=="polyline"){poly1.points.value=oldvalue;oldvalue="";poly1=null;}else{poly1.outerHTML="";oldvalue="";poly1=null;}
}
wenzi1.style.display='none';tupian1.style.display='none';gaoji1.style.display='none';menu1.style.display='none'
}}
function forerr(){
if(moveobj!=null&&bitext=="选移"){moveobj.style.left=xx-ckleft;moveobj.style.top=yy-cktop;ckleft=0;cktop=0;moveobj=null}
if(moveobj!=null&&bitext=="调大小"){
if(moveobj.tagName!="line"){moveobj.style.left=ckleft;moveobj.style.top=cktop;moveobj.style.width=ckwid;moveobj.style.height=ckhei;}else{moveobj.to=ckto;}
ckleft=0;cktop=0;ckwid=0;ckhei=0;ckto="";moveobj=null
}
line1.style.display='none';oval1.style.display='none';rect1.style.display='none';roundrect1.style.display='none';arc1.style.display='none'
}
function charuwenzi(){   //插入文字
if(txt1.value=="")return alert('请先输入文字,在点击插入')
wenzibiankuang.checked==true?thebiankuang="border:1 solid black;":thebiankuang=""
beijingtouming.checked==true?bkcolor1="":bkcolor1="background-color:"+wenzibeijing.value
var newtxt=document.createElement("<span style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";color:"+wenziyanse.value+";"+bkcolor1+";font-size:"+wenzidaxiao.options[wenzidaxiao.selectedIndex].text+";font-family:"+wenziziti.options[wenziziti.selectedIndex].text+";"+thebiankuang+"'></span>");newtxt.innerText=txt1.value
div1.appendChild(newtxt);wenzi1.style.display='none'
}
function charutupian(){   //插入图片
if(file1.value=="")return alert('请先输入图片路径(HTTP://或FILE:///)格式,在点击插入')
if(file1.value.indexOf("'")>-1)return alert("图片地址不可以含有违禁字符 ' 单引号")
str1=""
if(heibai.checked==true){str1=" grayscale='true'"}else{
if(duibi.options[duibi.selectedIndex].text!='默认对比度')str1=" gain='"+duibi.options[duibi.selectedIndex].text+"'"
if(secai.options[secai.selectedIndex].text!='默认色彩度')str1=" gamma='"+secai.options[secai.selectedIndex].text+"'"
if(liangdu.options[liangdu.selectedIndex].text!='默认亮度')str1=" blacklevel='"+liangdu.options[liangdu.selectedIndex].text+"'"
}
var newtxt=document.createElement("<v:Image style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";width:100;height:100' src='"+file1.value+"'"+str1+"/>");
div1.appendChild(newtxt);tupian1.style.display='none'
}
function document.onkeydown(){   //实现各种快捷键
if(event.srcElement.tagName!='TEXTAREA'){
with(document.all){
event.ctrlKey&&event.keyCode==90?chexiaock.click():
event.ctrlKey&&event.keyCode==89?fanchexiaock.click():
event.ctrlKey&&event.keyCode==38?fangda.click():
event.ctrlKey&&event.keyCode==40?suoxiao.click():
!event.ctrlKey&&event.keyCode==37?zuoyi.click():
!event.ctrlKey&&event.keyCode==38?shangyi.click():
!event.ctrlKey&&event.keyCode==39?youyi.click():
!event.ctrlKey&&event.keyCode==40?xiayi.click():
!event.ctrlKey&&event.keyCode==27?esc.click():
!event.ctrlKey&&event.keyCode==13?shiyunxing.click():str1=1}
}}
</SCRIPT>

<DIV οnmοusemοve='this.style.display="none"' id=showdiv
style="TABLE-LAYOUT: fixed; PADDING-RIGHT: 2px; DISPLAY: none; PADDING-LEFT: 2px; FONT-SIZE: 12px; Z-INDEX: 500; FILTER: alpha(style=1,finishopacity=55); LEFT: 0px; PADDING-BOTTOM: 2px; COLOR: navy; PADDING-TOP: 2px; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #fff7ff"></DIV>
<SCRIPT>
var oldtext="加速变量",colors1=new Array("#FFECD5","#FFF7FF","#FFFFEB","white","#F5FFEB","#EEFAFF","#FFFFEE","#EDFFFC")
var length1=colors1.length,dingshi=null,closetime
function showhelp(thetext){
try{
if(thetext!=oldtext){
clearTimeout(closetime)
if(showdiv.style.display=='none'){showdiv.style.left=event.x-3;showdiv.style.top=event.y+document.body.scrollTop+18;}
oldtext=thetext;
event.srcElement.tagName=="BUTTON"?temp1=event.srcElement.innerText:temp1=event.srcElement.value;
showdiv.innerHTML="<B>"+temp1+":</b>"+thetext;
showdiv.style.backgroundColor=colors1[Math.round(Math.random()*colors1.length)];

if(event.x>document.body.offsetWidth/2){
showdiv.style.left=event.x-(oldtext.length*12);showdiv.style.top=event.y+document.body.scrollTop+28;
}else{showdiv.style.left=event.x-3;showdiv.style.top=event.y+document.body.scrollTop+18;}

showdiv.style.display=''
closetime=setTimeout('showdiv.style.display="none"',4000)
}
}catch(e){}
}
</SCRIPT>
</CENTER></CENTER></CENTER></CENTER></BODY></HTML>

telweb.gdtel.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值