nextSibling下一个兄弟节点
previousSibling上一个兄弟
parentNode父亲节点
<select><option value="zs">中山</option><option value="gz">广州</option><option value="zh">深圳</option><option value="zh">珠海</option></select>
<script type="text/javascript">
//取得<select>元素节点下的子元素的个数
//var selectElement = document.getElementsByTagName("select")[0];
//var size = selectElement.childNodes.length;
//alert("select下共有"+size+"个元素"); //取得“中山”字符串
//var selectElement = document.getElementsByTagName("select")[0];
//var zsElement = selectElement.firstChild;
//var zs = zsElement.innerHTML;
//alert(zs); //取得"广州"字符串
//var selectElement = document.getElementsByTagName("select")[0];
//var zsElement = selectElement.firstChild;
//var gzElement = zsElement.nextSibling;
//var gz = gzElement.innerHTML;
//alert(gz); //取得"珠海"字符串
//var selectElement = document.getElementsByTagName("select")[0];
//var zhElement = selectElement.lastChild;
//var zh = zhElement.innerHTML;
//alert(zh); //取得"深圳"字符串
//var selectElement = document.getElementsByTagName("select")[0];
//var zhElement = selectElement.lastChild;
//var szElement = zhElement.previousSibling;
//var sz = szElement.innerHTML;
//alert(sz); //删除"广州"元素
var gzElement = document.getElementsByTagName("option")[1];
var selectElement = gzElement.parentNode;
selectElement.removeChild(gzElement); </script>