console
window.onload = function ()
{
var oDiv=ducument.createElement("div");
var op=document.createElement("p");
var oText=document.createTextNode("hi,Xi,xi");
oP.appendChild(oText);
oDiv.appendChild(oP);
document.body.appendChild(oDiv);
var oDiv1=document.createElement("div");
oDiv1.innerHTML="<p>Xi,Xi,xi</p><p>hhh</p>"
document.body.appendChild(oDiv1);
console.log("oDiv's innerText:"+oDiv.innerText);
console.log("oDiv's innerText:"+oDiv.innerText);
var oInput=document.createElement("input");
oInput.id="btn";
oInput.type="button";
oInput.value="按钮1";
document.body.appendChild(oInput);
var oInput1=document.createElement("div");
oInput1.innerHTML="<button>按钮2</button>"
document.body.appendChild(oInput1);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="-utf-8" />
<title></title>
<style type="text/css">
</style>
<script>
</script>
</head>
<body>
</body>
</html>