<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|网页特效代码(JsHtml.cn)---给表格添加一个滚动条的代码</title>
</head>
<body> 
<table border=1>
   <tr>
     <td><div style="width:100%;height:100;overflow-x:hidden;overflow-y:scroll">左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br>左单元格<br></div>
     </td>
     <td>右单元格
     </td>
   </tr>
</table>
</body>
</html>
上面是一个给table加滚动条的代码,我怎么能做到当table里的内容超过table长度的时候才显示滚动条,少于的时候就隐藏.怎么做啊?