HTML to a div assignment

Assigned to the HTML div

<div id="mazey">content</div>

  Use JavaScript:

var mazey = document.getElementById ( "mazey" ); 
mazey.innerHTML = data;

 Use jQuery:

$("#mazey").html(data);

  

  

  

Guess you like

Origin www.cnblogs.com/duguangming/p/11266379.html