div 文章内容自动分屏显示

<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript">

        var height = 0;

        function previousPage() {
            if (height > 0) {
                height -= 280;
            }
            var e = document.getElementById("content");
            e.scrollTop = height;
        }

        function nextPage() {
            height += 280;
            var e = document.getElementById("content");
            e.scrollTop = height;
        }
    </script>
</head>
<body>
    <div id="content" runat="server" style="width: 500px; height: 400px; overflow: scroll;
        overflow-x: hidden; overflow-y: hidden;">
    </div>
    <div>
        <input type="button" value="上一页" onclick="previousPage();" id="btnPreviousPage" />
        <input type="button" value="下一页" onclick="nextPage();" id="btnNextPage" />
    </div>
</body>

触摸屏飘过,搞死了

posted @ 2013-08-06 23:02  随风ˇ止步  阅读(853)  评论(0编辑  收藏  举报