百度空间 | 百度首页 
               
 
查看文章
 
HTML滚动条 特殊效果
2008-08-22 13:11

<script language="JavaScript" type="text/javascript">
   
    <!--- スクロール制御 --->
    function scrl() {
        x1= document.all.item('ListRowS').scrollLeft;
        y1 = document.all.item('ListRowS').scrollTop;
        <!--- x2 = document.all.item('ListRowH').scrollLeft; --->
        document.all.item('ListColS').scrollLeft = x1;
        document.all.item('ListRowH').scrollTop = y1;
        <!--- document.all.item('ListColH').scrollLeft = x2; --->
    }
   
</script>

<table border="1" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div id="ListColH" style="overflow-x: hidden; overflow-y: hidden; border-style: inherit; border-width: thin; padding: 0px;">
                <!--- tableを記述 --->
                <table border="0" cellspacing="0" cellpadding="0" class="list_waku" height="100%">
                    <tr>
                        aaaaa
                    </tr>
                </table>
            </div>
        </td>
        <td>
            <div id="ListColS" style="width: 420; overflow-x: hidden; overflow-y: hidden; border-style: inherit; border-width: thin; padding: 0px;">
                <!--- tableを記述 --->
                <table border="0" cellspacing="0" cellpadding="0" class="list_waku" height="100%">
                    <tr>
                        bbbbbb
                    </tr>
                </table>
            </div>
        </td>
    </tr>
    <tr>
        <td height="100%">
            <div id="ListRowH" style="height: 400; overflow-x: scroll; overflow-y: hidden; border-style: inherit; border-width: thin; padding: 0px;">
                <!--- tableを記述 --->
                <table border="2" cellspacing="0" cellpadding="0" class="list_waku" height="100%" width="100%">
                    <tr valign="top">
                        cccccc
                    </tr>
                </table>
            </div>
        </td>
        <td height="100%">
            <div id="ListRowS" style="height: 400; width: 435; overflow-x: scroll; overflow-y: scroll; border-style: inherit; border-width: thin; padding: 0px;" onscroll="scrl();">
                <!--- tableを記述 --->
                <table border="2" cellspacing="0" cellpadding="0" class="list_waku" height="100%" width="100%">
                    <tr valign="top">
                        ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
                    </tr>
                </table>
            </div>
        </td>
    </tr>
</table>


类别:javascript && web | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu