画得是折线。请问需要怎么做?坐标是传进来的参数。。大概要怎么写!在线等!........最少三个点
好像是什么<v:line from =XXXX to=XXXXX v:line>

解决方案 »

  1.   

    bbs.51js.com/viewthread.php?tid=78614
    参考一下
      

  2.   

    http://www.itlearner.com/code/vml/step3.html<v:PolyLine filled="false" Points="0,0 0,100 20,150 200,100" style="position:relative"/>
      

  3.   

    http://www.itlearner.com/code/vml/step3.html<v:PolyLine filled="false" Points="0,0 0,100 20,150 200,100" style="position:relative"/>
      

  4.   

    <html xmlns:v="http://www.eglic.com/">
    <head>
    <title></title>
    <meta name="Generator" content="EditPlus" />
    <meta name="Author" content="eglic" />
    <meta name="ContentType" content="text/html" />
    <meta name="CharSet" content="GB2312" />
    <link rel="stylesheet" type="text/css" href="/style/default.css" />
    <style type="text/css">
    v\:* {behavior:url(#default#VML);}
    </style><script language="javascript">
    var Working=false;
    var lastX=0;
    var lastY=0;
    var color= "blue";
    document.ondblclick=function (){
    if(!Working) return;
    lastX=0;
    lastY=0;
    Working=false;
    }
    document.onclick=function (){
    if(!Working){
    Working=true;
    lastX=event.x;
    lastY=event.y;
    }else{
    var s='<v:line from="'+lastX+','+lastY+'" to="'+event.x+','+event.y+'" style="position:absolute;left:0px;top:0px;" StrokeColor="'+color+'"></v:line>';
    lastX=event.x;
    lastY=event.y;
    var o=document.createElement(s);
    document.body.insertAdjacentElement('BeforeEnd',o);
    }
    }
    document.onmousemove=function (){
    if(!Working) return;
    }
    </script>
    </head>
    <body>
    </body>
    </html>