console
window.onload=function(){
var oDiv =document.createElement("div");
var oP=document.createElement("p");
oDiv.appendChild(oP);
var oText=document.createTextNode("Hi");
oP.appendChild(oText);
var oP1=document.createElement("p");
oDiv.appendChild(oP1);
var oText1=document.createTextNode("Hi");
oP.appendChild(oText1);
document.body.appendChild(oDiv);
var oDiv1=document.createElement("div");
document.body.appendChild(oDiv1);
oDiv1.innerHTML="<p>Hi</p>\
<p>Hi!!</p>";
console.log("line 22"+oDiv1.innerText);
var oInput = document.createElement("input");
document.body.appendChild(oInput);
oInput.type = "button";
oInput.value = "按钮";
oInput.id= "btn";
document.body.innerHTML = '<input id="btn" type="button" value="按钮"/>'
var oDiv1 = document.createElement("div");
oDiv1.innerHTML="<p>Hi, innerHTML</p><p> the second innerHTML</p><p> the third innerHTML</p>";
document.body.appendChild(oDiv1);
document.body.innerHTML
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
</style>
<script>
</script>
</head>
<body>
</body>
</html>