zoukankan      html  css  js  c++  java
  • jquery extension auto height text area

    Introduction
    1. This textarea is like the google calendar's description when you create one new or update one existence calendar;
    2. Its height will be changed accroding to user's input;
    3. Its scrollbar is removed, which makes it much user friendly. I guess you may like it.

    Using the code

     1. import the jquery.js and textarea.js
     <script language="javascript" type="text/javascript" src="js/jquery.min.js"></script>
     <script language="javascript" type="text/javascript" src="js/textarea.js"></script>


    2. add the following css
    <style type="text/css">
        .autoHeight{border:1px solid #666666; 300px; height:60px; line-height:20px; font:11px verdana; overflow:hidden;}
    </style>

    3. add one textare html control
    <textarea class="autoHeight" id="textarea1"></textarea>


    4. make it works
    <script language="javascript" type="text/javascript">
            $(document).ready(function () {
                $(".autoHeight").TextAreaAutoHeight();
            });
    </script>      

    demo
    please click here to view details

      

  • 相关阅读:
    php主要输出方式的区别
    文件操作
    会话
    Jquery常用函数及功能
    AJAX
    php 审核注册
    转载图片上传预览 代码
    php笔记-图片上传
    php 练习题-session与 cookie的 取值赋值
    php学习笔记-会话控制简单介绍session和cookie(一)
  • 原文地址:https://www.cnblogs.com/yang_sy/p/1790759.html
Copyright © 2011-2022 走看看