-1
Set the id in the tag you want to insert this paragraph with for example "content". And set the content as follows:
document.getElementById("content").innerHTML = "<p>New text!</p>";
-1
0
Set the id in the tag you want to insert this paragraph with for example "content". And set the content as follows:
document.getElementById("content").innerHTML = "<p>New text!</p>";
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
could you explain better what you’re doing? How can I reproduce the error?
– Cedric S.
i created a click event for when I clicked on an obj would create a <p>, but when using Document.write to create it, the code on the site is uploaded only by <p>
– nomeAleatorio