1.DOM操作的删除属性和添加属性
String Element.getAttribute(attrName);//获取对象属性值
void Element.setAttribute(attrName,attrValue);//设置对象的属性值
void Element.removeAttribute(attrName);//删除对象属性
Boolean Element.hasAttribute(attrName);//判断属性是否存在
2.jquery操作的删除属性和添加属性
obj.attr(attrName);//获取对象属性值,如果值为undefined则该属性不存在
obj.attr(attrName,attrValue);//设置对象属性值
obj.removeAttr(attrName);//删除对象的指定属性