• “% ” + gradient2.fillcolor + “,” + n2 + “% ” +
    gradient3.fillcolor;if(type1.style.borderColor ==
    “black”)gradientBar.type = “solid”;elsegradientBar.type =
    “gradient”;if(type2.style.borderColor == “red”)gradientBar.type =
    “gradientradial”;n1 = (parseInt/m*100;n2 =
    (parseInt/m*100;gradientBar.focusposition.value = n1 + “%,” + n2 +
    “%”;gradientBar.angle = (parseInt * 3.6;gradientBar.opacity =
    (parseInt-8)/m}**************
    XMLtool.js*************// 传送XML文档到服务器function
    saveXML(){var xmlHTTP = new
    ActiveXObject;xmlHTTP.open(“POST”,”server.php”,false); //
    使用ASP时用server.aspxmlHTTP.setRequestHeader(“Contrn-type”,”text/xml”);xmlHTTP.setRequestHeader(“Contrn-charset”,”gb2312″);xmlHTTP.send(tree(canvas.documentElement));var
    s = xmlHTTP.responseText;minview.innerHTML =
    s.replace(/WIDTH:500;HEIGHT:300/,”WIDTH:120;HEIGHT:72″)if(xmlHTTP.responseText.indexOf
    {alert;}}// 遍历xml对象,解析xml的核心函数集function tree {var buffer =
    “”;var node = “”;if(Element.nodeType != 3) {node = Element;buffer +=
    onElement;}if(Element.nodeType == 3)buffer +=
    onData;if(Element.hasChildNodes) {for(var i=0;i” : “>”;return
    buffer;}// 遍历xml对象–节点结束function endElement {return +
    Element.nodeName + (debug ? “>
    ” : “>”);}// 遍历xml对象–节点数据function onData {return
    Element.nodeValue}

脚本**************
VMLgraph.js*************var xo=0;var yo=0;var ox=80;var
oy=20;var dx=0;var dy=0;var drawKey = false;var itemID = 0;var
ShapeItemNum = 0;var ShapeItemX = 0;var ShapeItemY = 0;var CurveItemNum
= 0;var NodeDelete = false;var ToolBarNum = 2; // 预置的工具编号var
gradientX = -1;function cursor {xo = event.clientX – ox;yo =
event.clientY – oy;ifoxy.innerHTML = xo+”,”+yo;elseoxy.innerHTML =
“”;if;view.innerHTML = tree(canvas.documentElement,0);}}function
setOverColor return;v.myColor = v.strokecolor;if(v.strokecolor ==
“red”)v.strokecolor=’#000000′;elsev.strokecolor=’#ff0000′;}function
setOutColor return;v.strokecolor = v.myColor;view.innerHTML =
tree(canvas.documentElement,0);}function deleteNode return;var id =
v.id;for(i=0;i 0) {Element =
canvas.documentElement.childNodes[新澳门31999 ,0].lastChild;var str =
Element.getAttribute;Element.setAttribute = str + ” x e”;view.innerHTML
= tree(canvas.documentElement,0);ShapeItemNum =
0;}}ifif(textbox.style.visibility == “hidden”)textbox.style.visibility =
“visible”;elsetextbox.style.visibility = “hidden”;NodeDelete = false;if
{NodeDelete = true;view.innerHTML = tree(canvas.documentElement,0);}}//
颜色选择//var setcolorkey = color1;function setcolor {var setcolorkey =
color1;setcolorkey.fillcolor = c;}function gradientColor {v.fillcolor =
color1.fillcolor;gradientRefresh();return;var m =
tools.documentElement.selectNodes(“/*/gradient//v:shape”).length;var
node = tools.documentElement.selectNodes(“/*/gradient//v:shape”);for
{if(node[i].getAttributenode[i].setAttribute =
color1.fillcolor;}gradientRefresh();}function gradientPointgradientX =
xo – 508 – parseInt;n = xo – 508 – gradientX;if n = 8;if n =
108;v.style.left = n;gradientRefresh();}function anglePoint
{angle.style.left = Math.floor*25+8;gradientRefresh();}function
opacityPoint {opacity.style.left =
Math.floor*25+8;gradientRefresh();}function settype
{if(v.style.borderColor == “black”)v.style.borderColor =
“red”;elsev.style.borderColor = “black”;gradientRefresh();}function
setGradientX() {gradientX = -1;}function gradientRefresh() {var m =
(parseInt-parseInt);var n1 = (parseInt-parseInt)/m*100;var n2 =
(parseInt-parseInt)/m*100;gradientBar.color.value =
gradient1.fillcolor;gradientBar.color2.value =
gradient4.fillcolor;if(type3.style.borderColor ==
“black”)gradientBar.colors.value = “,”;elsegradientBar.colors.value = n1

发表评论

电子邮件地址不会被公开。 必填项已用*标注