function window.onload()
{

document.all["s1"].runtimeStyle.height=document.all["s1"].scrollHeight+"px";
}
试一试

解决方案 »

  1.   

    你把程序放到后面去试试<table border=1 width=90% height=95% style="table-layout:fixed;border-collapse:collapse;font-size:13">
    <tr>
    <td valign=top style="padding-left:1em;padding-top:1em;width:150">
    作者:<%=t_author%>
    </td>
    <td style="padding: 3em 3em 3em 3em">
    <textarea  name=s1 rows=1 cols=10 style="padding:3em 3em 3em 3em;overflow:hidden;width:100%;background-color:#FFFFEF"><%=t_content%></textarea>
    </td>
    </tr>

    </table><script>
    function window.onload()
    {

    s1.runtimeStyle.height=s1.scrollHeight+"px";
    }
    </script>
      

  2.   

    to zhangguagua(瓜瓜)、 betterjonah(jonah)
    无论是name还是id,js中调用都没有问题的!