基于jquery的讓textarea自適應(yīng)高度的插件
更新時間:2010年08月03日 00:38:12 作者:
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; width: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>
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" id="textarea1"></textarea>
4. make it works
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$(".autoHeight").TextAreaAutoHeight();
});
</script>
相關(guān)文章
jQuery判斷元素是否顯示 是否隱藏的簡單實現(xiàn)代碼
下面小編就為大家?guī)硪黄猨Query判斷元素是否顯示 是否隱藏的簡單實現(xiàn)代碼。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-05-05
由簡入繁實現(xiàn)Jquery樹狀結(jié)構(gòu)的方法(推薦)
下面小編就為大家?guī)硪黄珊喨敕睂崿F(xiàn)Jquery樹狀結(jié)構(gòu)的方法(推薦)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-06-06
jquery中ajax請求后臺數(shù)據(jù)成功后既不執(zhí)行success也不執(zhí)行error的完美解決方法
這篇文章主要介紹了jquery中ajax請求后臺數(shù)據(jù)成功后既不執(zhí)行success也不執(zhí)行error解決方法,需要的朋友可以參考下2017-12-12
jQuery插件Echarts實現(xiàn)的漸變色柱狀圖
本文主要介紹了jQuery插件Echarts實現(xiàn)漸變色柱狀圖的實例。具有很好的參考價值。下面跟著小編一起來看下吧2017-03-03
jQuery輕松實現(xiàn)表格的隔行變色和點擊行變色的實例代碼
下面小編就為大家?guī)硪黄猨Query輕松實現(xiàn)表格的隔行變色和點擊行變色的實例代碼。小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考,一起跟隨小編過來看看吧2016-05-05

