<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function web() //web编译器
{
   var x=document.getElementById("xt1");
    alert(x.textContent);//FF下 网页运行的时候 点击按钮 永远只能得到 “呵呵” 在修改textarea也不会得到最新的
    alert(x.innerText); //IE下 网页运行的时候给 textarea输入内容 在点击按钮 会输出相应的内容
}
</script></head>
<body>
<textarea name="xt" id="xt1" cols="50" rows="30"> 呵呵 </textarea>
<input id="d1" type="button" value="。" onclick="web()" /></body>
</html>