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

發佈了24 篇原創文章 · 獲贊 2 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章