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; width:300px; height:60px; line-height:20px; font:11px verdana; overflow:hidden;}
</style>

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


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

 

 

 

demo
please click here to view details

  

相关文章:

  • 2021-04-02
  • 2022-12-23
  • 2021-07-22
  • 2021-09-29
  • 2021-12-16
  • 2021-11-28
  • 2022-02-02
  • 2022-12-23
猜你喜欢
  • 2021-11-24
  • 2022-03-03
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
相关资源
相似解决方案