1. x.getAttribute(attributeName): 获取指定属性名的属性值。
  2. x.setAttribute(attributeName, attributeValue): 设置指定属性名的属性值。
  3. x.removeAttribute(attributeName): 移除指定属性名的属性。
  4. x.style.propertyName: 获取或设置指定 CSS 样式属性的值。
  5. x.classList: 获取元素的类名,可以通过该属性进行添加、删除、切换类名等操作。
function getValuevar x=documentgetElementByIdmyHeaderalertxinnerHTML x 除了innerHTML方法还有什么别的方法

原文地址: https://www.cveoy.top/t/topic/fniT 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录