国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

基于jquery的讓textarea自適應高度的插件

2019-11-21 00:19:10
字體:
來源:轉載
供稿:網友
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>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 靖安县| 深泽县| 南川市| 全州县| 伊金霍洛旗| 威信县| 洪雅县| 胶南市| 南华县| 泗阳县| 庆元县| 东明县| 郑州市| 甘南县| 莲花县| 平昌县| 沾益县| 澄江县| 麻城市| 济南市| 东丽区| 红原县| 虎林市| 永州市| 赣榆县| 南宁市| 海门市| 淳化县| 新泰市| 眉山市| 施秉县| 旬阳县| 肇东市| 四子王旗| 海阳市| 四平市| 黑水县| 门头沟区| 永兴县| 遵义县| 南乐县|