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");
    $(".bigger").click(function(){

    if(!$comment.is(":animated"))
    {
    if($comment.height()<500)
    {
    $comment.animate({height:"+=50"},400);
    }

    }

    });

    $(".smaller").click(function(){
    if(!$comment.is(":animated"))
    {
    if($comment.height()>50)
    {
    $comment.animate({height:"-=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="bigger">向上</span>
    <span class="smaller">向下</span>
    </div>
    <div>
    <textarea name="" id="comment" cols="20" rows="8">多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化多行文本框变化</textarea>
    </div>
    </div>

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

  • 相关阅读:
    miniSpartan6, another Spartan 6 Kit
    XuLA/XuLA2
    Papilio Pro Boards
    STM32 Hardware Development
    Configuring spartan 6 using mcu and spi flash
    STM32 IO口双向问题
    [Projet] Module NFC
    Spartan-6 FPGA Configuration
    TRF7970A IC Communication Interface
    电动门/汽车遥控器拷贝机
  • 原文地址:https://www.cnblogs.com/ll-taj/p/5807350.html
Copyright © 2011-2022 走看看