以下的代码中的javascript函数应该如何写,才能把已经有箭头的线变为没有箭头?
<HTML xmlns:v>
<HEAD>
<style>
v\:*{behavior:url(#default#VML);position:absolute;}o\:*{behavior:url(#default#VML);}
</style>
</head>
<body>
<v:PolyLine id= "ply1 " filled= "false " Points= "0,0 0,100 20,150 200,100 " strokeweight= "2 " style= "position:relative ">
<v:stroke StartArrow= " " EndArrow= "Open " dashstyle= "Dot " />
</v:PolyLine>
<input type=button onclick= "doTest() " value= "测试去掉箭头 ">
<script language= "javascript ">
function doTest(){
var obj=document.all.ply1;
//obj.childNodes[0].removeAttribute( "endArrow ");
}
</script>
</body>
</html>
------解决方案--------------------
附 :
endArrow、startArrow没有 " "值类型
可选类型:
None (default)
Block
Classic
Diamond
Oval
Open
------解决方案--------------------
<HTML xmlns:v>
<HEAD>
<style>
v\:*{behavior:url(#default#VML);position:absolute;}o\:*{behavior:url(#default#VML);}
</style>
</head>
<body>
<v:PolyLine id= "ply1 " filled= "false " Points= "0,0 0,100 20,150 200,100 " strokeweight= "2 " style= "position:relative ">
<v:stroke id= "ply2 " StartArrow= " " EndArrow= "Open " dashstyle= "Dot " />
</v:PolyLine>
<input type=button onclick= "doTest() " value= "测试去掉箭头 ">
<script language= "javascript ">
function doTest(){
vS=document.getElementById( "ply2 ");
vS.EndArrow= "None ";
}
</script>
</body>
</html>