Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
获得 HTMLDivElement 后,例如 coolElement,您可以尝试以下操作:
coolElement.attributes['name']
coolElement.attributes['action']。
coolElement.attributes['attribute_name'].nodeValue