HTML CSS Javascript jQuery AJAX PHP Java MORE

How to add HTML element using Javascript

We often need form data on the same page to send the data through AJAX. So in this example we will learn how to get value by Id Javascript.

<!DOCTYPE html>
	<div id="new">
		<p id="p1">Student</p>
		<p id="p2">Tutorial</p>
		var para = document.createElement("p");
		var node = document.createTextNode("Student Tutorial is a online tutorial platform !");
		var element = document.getElementById("new");

Run it yourself