zoukankan      html  css  js  c++  java
  • 滚动条高度变化jQuery

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="jquery-1.4.2.js"></script>
    <script type="text/javascript">
    $(function(){
    var $comment=$("#comment");
    $(".up").click(function(){
    if(!$comment.is(":animated"))
    {
    $comment.animate({scrollTop:"+=50"},400);
    }

    });

    $(".down").click(function(){
    if(!$comment.is(":animated"))
    {
    $comment.animate({scrollTop:"-=50"},400);
    }

    });

    });
    </script>
    <style>
    span{display:inline-block;50px;height:20px;line-height:20px;text-align:center;color:#fff;background:#999;}
    textarea{border:1px solid #000;300px;height:100px;}
    </style>

    </head>

    <body>
    <form action="">
    <div class="message">
    <div class="cap_aption">
    <span class="up">向上</span>
    <span class="down">向下</span>
    </div>
    <div>
    <textarea name="" id="comment" cols="20" rows="8">多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化行文本框变化多行文本框变化多行文本框变行文本框变化多行文本框变化多行文本框变行文本框变化多行文本框变化多行文本框变行文本框变化多行文本框变化多行文本框变行文本框变化多行文本框变化多行文本框变行文本框变化多行文本框变化多行文本框变</textarea>
    </div>
    </div>

    </form>
    </body>
    </html>

  • 相关阅读:
    hdu 5238 Calculator(线段树,中国剩余定理¥)
    hdu 5237 Base64(模拟)
    hdu 5236 Article(概率dp¥)
    hdu 2147 kiki's game(找规律)
    hdu 2149 Public Sale(bash)
    Calculation PartⅡ
    Calculator Part Ⅰ (代码规范化修改)
    Calculator Part Ⅰ
    视频课程
    编程题1001.A+B Format (20)
  • 原文地址:https://www.cnblogs.com/ll-taj/p/5807344.html
Copyright © 2011-2022 走看看