html()

Sets the inner HTML of the element, replacing any existing HTML.

The second parameter, append, is optional. If true is passed, as in myElement.html('hi', true), the HTML is appended instead of replacing existing HTML.

If no arguments are passed, as in myElement.html(), the element's inner HTML is returned.

उदाहरण

सिंटैक्स

html()
html([html], [append])

पैरामीटर्स

html
String:

the HTML to be placed inside the element

append
Boolean:

whether to append HTML to existing

Returns

String: the inner HTML of the element
This page is generated from the comments in src/dom/dom.js . Please feel free to edit it and submit a pull request!

संबंधित संदर्भ