<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
>
< HTML >
< HEAD >
< TITLE > Option Test </ TITLE >
< META NAME ="Generator" CONTENT ="EditPlus" >
< META NAME ="Author" CONTENT ="" >
< META NAME ="Keywords" CONTENT ="" >
< META NAME ="Description" CONTENT ="" >
< SCRIPT LANGUAGE ="JavaScript" >
<!--
function RemoveMe(){
//document.getElementById("test").options[1] = null;
document.getElementById("test").options[1].parentNode.removeChild(document.getElementById("test").options[2]);
}
//-->
</ SCRIPT >
</ HEAD >
< BODY >
< form >
< select id ="test" >
< option value ="1" > 1 </ option >
< option value ="2" > 2 </ option >
< option value ="3" > 3 </ option >
< option value ="4" > 4 </ option >
</ select >
< input type ="button" value ="确定" onclick ="RemoveMe();" />
</ form >
</ BODY >
</ HTML >
< HTML >
< HEAD >
< TITLE > Option Test </ TITLE >
< META NAME ="Generator" CONTENT ="EditPlus" >
< META NAME ="Author" CONTENT ="" >
< META NAME ="Keywords" CONTENT ="" >
< META NAME ="Description" CONTENT ="" >
< SCRIPT LANGUAGE ="JavaScript" >
<!--
function RemoveMe(){
//document.getElementById("test").options[1] = null;
document.getElementById("test").options[1].parentNode.removeChild(document.getElementById("test").options[2]);
}
//-->
</ SCRIPT >
</ HEAD >
< BODY >
< form >
< select id ="test" >
< option value ="1" > 1 </ option >
< option value ="2" > 2 </ option >
< option value ="3" > 3 </ option >
< option value ="4" > 4 </ option >
</ select >
< input type ="button" value ="确定" onclick ="RemoveMe();" />
</ form >
</ BODY >
</ HTML >