其区别如图所示:

但是FF里面的innerText不可用,但是有一个替代方法: textContent
IE: oDiv.innerText = aString; oDiv.innerHTML = aString;
FF: oDiv.textContent = aString; oDiv.innerHTML = aString;
innerHTML,outerHTML,innerText,outerText这些都是相对于某个标签的id而言的,以下代码是可以直接运行看到区别的:
<font color="green"><h2>THis is Div</h2></font>
</div>
<input type="button" name="innerHTML" value="innerHTML" onclick="alert(div.innerHTML);"/>
<input type="button" name="outerHTML" value="outerHTML" onclick="alert(div.outerHTML);"/>
<input type="button" name="innerText" value="innerText" onclick="alert(div.innerText);">
<input type="button" name="outerText" value="outerText" onclick="alert(div.outerText);">



<td class="tdFormInput" width="30%"><@ww.textfield name="'appealMail.name'" id="name" cssClass="'inputTextNormal'" tabindex="'2'" disabled ="'${showState}'" onblur="'return checkusername()'"/><font color="C90E00">* <label id="username"></label></td>
var checkname = document.getElementById('name').value;
if(checkname==''){
document.getElementById('username').innerText="请输入姓名!";
return false;
}
document.getElementById('username').innerText="";
return true;
}