Using AJAX will use the dynamic creation of JS HTML elements, here is a simple way to tell:
Parse the HTML element first
<span style= "FONT-SIZE:18PX;" ><body></span><font color= "Red" size= "> Red <p> Line Wrapping </p></font></body>
include the name, attributes, and content of the HTML element
< Name Property 1 = "Property 2=" "> Content </name >
The first step, of course, is to create a name
var cFont = document.createelement (' font ');
Part Two setting properties
Cfont.setattribute ("Color", "red"); Cfont.setattribute ("Size", "12");
add content in the third section
Cfont.innerhtml= "Red";
The fourth part is added to the body or other elements (the font is inside the body)
Document.body.appendChild (CFont);
The complete code is attached below
<script type= "text/javascript" >window.onload = function () {var cFont = document.createelement (' font '); Cfont.setattribute ("Color", "red"), Cfont.setattribute ("Size", "n"); cfont.innerhtml= "Red"; var CP = Document.createelement (' P '); cp.innerhtml= "line Break";d Ocument.body.appendChild (CFont); Cfont.appendchild (CP); }</script>
The effect is:
Red
Line break
JavaScript dynamically creates HTML elements