innerHTML will return a string. This string can be used to create a DOM. From there, the methods to access elements and attributes are per the DOM specifications. In particular, if you have an Element object you can use the getAttribute() method to retrieve an attribute value.
Dig Deeper on Development implications of microservices architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.