vml画线后怎么删除!
var InsertLine="<v:PolyLine filled='false' strokeWeight=2.2pt strokeColor='red' Points='"+xxl+"' style='position:absolute'/>";
var newPoint = document.createElement(InsertLine);
ohye.insertBefore(newPoint);
中间 ohye 是 页面上的Id
要怎么删除 这个。。。。
我的意思是 当鼠标移动上去的时候触发事件 出现一条线!(已经解决)
鼠标移走的时候线消失~(等待大家帮助解决.....)
[解决办法]
和HTML一样删
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns:v="urn:schemas-microsoft-com:vml"><head> <title>Thinking in VML</title></head><STYLE> v\:* { BEHAVIOR: url(#default#VML) }</STYLE><body><div id="div1"> </div><input type="button" onclick="delPoly()" value="删除"><script language="javascript" type="text/javascript" defer>var InsertLine="<v:PolyLine filled='false' strokeWeight=2.2pt strokeColor='red' Points='0,0 0,100 20,150 200,100' style='position:absolute'/>"; var newPoint = document.createElement(InsertLine); var ohye=document.getElementById("div1")ohye.insertBefore(newPoint); function delPoly(){ newPoint.removeNode(true)}</script></body>