日期:2014-05-17  浏览次数:20609 次

innerHTML、outerHTML、outerText、innerText区别
<html>


<div id="zjd">

<table >
<tr><td>table</td></tr><tr><td>table2</td></tr>
</table>

</div>


<script language="javascript">
var oo = document.getElementById('zjd');
alert("innerHTML" + oo.innerHTML);
alert("outerHTML" + oo.outerHTML);
alert("innerText" + oo.outerText);
alert("innerText" + oo.innerText);
</script>
</HTML>