เช่นมี tag p มี id= example_placeholder
โค้ด: เลือกทั้งหมด
<p id="example_placeholder">Existing content that will be replaced.</p>
โค้ด: เลือกทั้งหมด
$('#example_placeholder').html();
โค้ด: เลือกทั้งหมด
$('#example_placeholder').html('This existing content has been replaced with this content.');
โค้ด: เลือกทั้งหมด
$('#example_placeholder').append(' This text has been appended to the end.');