表单控件操作:
value、text->表单控件通用属性;
下拉框:
selectElement.options->返回子节点,数组;
selectElement.remove(position)删除该下拉框第position+1个option节点
selectElement.options[selectedIndex].value获取该下拉菜单选中的option的值;
text->获取option的文本;
selected == true/false;是否被选中
defaultSelected == true/false是否默认选中
操作元素属性
node.setAttribute("attrName","val")修改、添加属性;
node.getAttribute("attrName")获取属性;
node.removeAttribute("attrName","val")删除属性;
DOM操作css
1、node.style.display = "block";
2、node.style["display] = "block";
3、node.style.setProperty = "block";
兼容:
node.style.webkitTransform = "";
node.style.mozTransform = "";
node.style.msTransform = "";
node.style.OTTransform = "";
node.style.transform = "";