⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fywvml.htm

📁 vml编辑器,用html和javscript写成,通过 在浏览器中编辑,生成vml代码
💻 HTM
📖 第 1 页 / 共 4 页
字号:
按照像素 <select style="width:54;" id=anzhaoxiangsu><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%;height:100%;cursor:move'>文字化基本设置</center><br>
文字大小 <select style="width:54;" id=wenzidaxiao2><option>50<script>document.write(temp101)</script></select><br>
文字颜色 <input style='border:1 solid black;width:54;height:17;' id=wenziyanse2 onmousedown='rndcolor(this.id)' value='#000000'><br>
字体 <select style="width:80;" id=ziti2><script>document.write(zitistr)</script></select><br>
</span>
<span id=gaojituxing1 style='display:none'>
<br><center style='width:100%;height:100%;cursor:move'>选择一种高级图形</center><br>
三角型 <input type='radio' name='xuanzetuxing' checked><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%;height:100%;cursor:move'>全局操作</td></tr><Tr><Td>
<input type='button' value='撤消' onclick='if(youbiao>0){div1.innerHTML=chexiao[youbiao];youbiao-=1;fanchexiao1=2}' class=bon2 id=chexiaock onmousemove='showhelp("快捷键Ctrl+Z")'><input type='button' value='反撤消' onclick='if(youbiao<chexiao.length-fanchexiao1){youbiao+=fanchexiao1;fanchexiao1=1;div1.innerHTML=chexiao[youbiao];}else if(chexiao.length-youbiao==1&&youbiao>0){div1.innerHTML=zuizhongxingtai}' class=bon2 id=fanchexiaock onmousemove='showhelp("快捷键Ctrl+Y")'><br>
<input type='button' value='放大' onclick='for(i=0;i<div1.all.length;i++){try{fangda(div1.all[i])}catch(e){}}' class=bon2 id=fangda onmousemove='showhelp("快捷键Ctrl+↑")'><input type='button' value='缩小' onclick='for(i=0;i<div1.all.length;i++){try{suoxiao(div1.all[i])}catch(e){}}' class=bon2 id=suoxiao onmousemove='showhelp("快捷键Ctrl+↓")'><br>
<input type='button' value='左移' onclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)-10;}catch(e){}}' class=bon2 id=zuoyi onmousemove='showhelp("快捷键←")'><input type='button' value='右移' onclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)+10;}catch(e){}}' class=bon2 id=youyi onmousemove='showhelp("快捷键→")'><br>
<input type='button' value='上移' onclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)-10;}catch(e){}}' class=bon2 id=shangyi onmousemove='showhelp("快捷键↑")'><input type='button' value='下移' onclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)+10;}catch(e){}}' class=bon2 id='xiayi' onmousemove='showhelp("快捷键↓")'><br>
<input type='button' value='试运行' onclick='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)' class=bon2 id=shiyunxing onmousemove='showhelp("快捷键回车键")'><input type='button' value='全部清除' onclick='savechexiao();div1.innerHTML="";poly1=null;thisobj=null;' class=bon2 id=esc onmousemove='showhelp("快捷键ESC")'>
</td></tr>
<Tr><Td><center style='width:100%;height:100%;cursor:move'>系统功能</td></tr>
<tr><Td>
<input type='button' value='查看及修改源码' onmousemove='showhelp("把已保存的VML代码粘贴修改实现打开,或者手写修改当前编辑器内的所有VML代码")' class=bon2 style='width:110' onclick="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=''"><br>
<input type='button' value='保存为文件' onmousemove='showhelp("将编辑器图型保存为后缀为htm的文件,注意保存时请使用Unicode保存")' class=bon2 style='width:110' onclick="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)"><br>
<input type='button' id='fywvmlhelp' value='FYWVml帮助手册' class=bon2 style='width:110' onclick='window.open("fywvmlhelp/fywvmlhelp.htm")' onmousemove='showhelp("打开FYWVml的帮助文件")'><br>
<center style='width:100%;height:100%;cursor:move'>
<a href='http://www.lshdic.com' onmousemove='showhelp("访问原作者FYW(风云舞)的主页")' value='Original author' target='_target'>原作者:FYW</a>
</td></tr></table>
<table cellspacing=0 cellpadding=0 style='position:absolute;width:100;height:100;display:none;background-color:red;z-index:3000' id='colortab'><tr><td id='colorid'></td></tr></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 "调大小":  //调大小

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -