Maison >interface Web >js tutoriel >JS画线(实例代码)_javascript技巧
IE下画线
<script><BR>var R =function(){};<BR>R.prototype.createLine = function (startX,startY,endX,endY){ <BR> var le = document.createElement( "<v:line><v:line>" ); <BR> le.from = startX + ',' + startY ; <BR> le.to = endX + ',' + endY ; <BR> le.strokecolor= "red" ; <BR> le.strokeweight= "1pt" ; <BR> return le; <BR>} <BR>var d =new R();<BR>document.body.appendChild(d.createLine(1,1,200,100));<BR></script>