Be seen. Boost your question’s priority for more expert views and faster solutions
<script type="text/javascript">
window.onload=function(){
var newP = document.createElement('p');
newP .innerHTML = "Hello";
document.getElementById("Div1").appendChild(newP);
};</script>
This would add a div to the existing parent element without replacing existing stuff.$("#Div1").append("<p>hello</p>");
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Open in new window