Display HTML using .this
Hello,
I'm attempting to output HTML element onto DOM depending on user input (click). Here is sample code:
When running this code, I get this output on page
I'm attempting to output HTML element onto DOM depending on user input (click). Here is sample code:
When running this code, I get this output on page
[object HTMLButtonElement], however, if I change this to this.innerHTML, I get the children of the element without the parent. How do I go about outputting the entire HTML of the button?