partial interface Element {
[TreatNullAs=EmptyString] attribute DOMString innerHTML;
[TreatNullAs=EmptyString] attribute DOMString outerHTML;
void insertAdjacentHTML(DOMString position, DOMString text);
};
The outerHTML IDL attribute represents the markup of the Element and its contents.
Returns a fragment of HTML or XML that represents the element and its contents.
Can be set, to replace the element with nodes parsed from the given string.
In the case of an XML document, will throw an InvalidStateError if the element cannot be serialized to XML, and a
SyntaxError if the given string is not well-formed.
Throws a NoModificationAllowedError exception if the parent of the element is the Document node.
I highly recommend this book for beginners as well as advanced programmers:
Nguồn: https://dinhk.net/
Xem thêm bài viết: https://dinhk.net/category/giai-tri/
One Response
Very detailed overview. Thanks. Now everything it's clear to me.