Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div></div>
<script type="text/javascript">
var Myp = document.createElement("p");
Myp.innerHTML = "Hello world!";
Myp.id = "myID";
document.getElementsByTagName('div')[0].appendChild(Myp);
alert(Myp.id);
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507