STUDY/WEB

[html] 스크롤 처리 Thead고정 TBody만 움직임

Kay.D.o0 2016. 8. 30. 16:34

<div  id="titleH" style="overflow: hidden; width: expression(document.body.clientWidth-17);"> 
    <table width="313" border="0" cellspacing="0" cellpadding="0">
         <thead>

             <tr>

           <td>내용</td>

    </tr>

</thead>

      </table>
 </div>
 <div id="titleB" style="height: 150px; overflow-y: scroll;"  onscroll="javascript:document.all.titleH.scrollLeft = document.all.titleB.scrollLeft">   
    <table width="313" border="0" cellspacing="0" cellpadding="0"
        <tbody>  

      <tr>

             <td>내용</td>

           </tr>
        </tbody>       
     </table>
  </div>