Questions tagged [innerhtml]

innerHTML is a DOM node's property that gets or sets the inner HTML code of an HTML element. It is commonly used in Javascript to dynamically change or read from a page.

innerHTML is a DOM node's property that gets or sets the inner HTML code of an HTML element. It is commonly used in JavaScript to dynamically change or read from a page.

Syntax to get innerHTML

var content = element.innerHTML; /* To get the inner HTML of an element */

where,

content contains the serialized HTML code describing all of the element's descendants.

Syntax to set innerHTML

element.innerHTML = content; /* To set the inner HTML of an element */

Removes all of element's children, parses the content string and assigns the resulting nodes as children of the element.

2983 questions
0
votes
1 answer

MSGraph - Is it possible to slice an attribute called from an API?

I am using MGT (Microsoft Graph Toolkit) and was wondering if it was possible to slice an attribute. Here is my code: