createTextNode ( 'This is a new paragraph.' ) Then you must append the text node to the
element: para.This code creates a text node: const node document. createElement ( 'p' ) To add text to theelement, you must create a text node first. A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the end of each element in the set of matched elements. element: const para document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |