When I click on the following links:
How can I create a new page using JavaScript?
Create and dynamically append elements
I'm looking to dynamically add HTML elements with JavaScript within a div
, but I don't want my code to become overly complex like in the second link. Is there a way to achieve this with just one line of code, similar to what is shown in the first link?
I prefer not to use JQuery for this task.