introduction
1. thisTextarea 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. thisTextarea 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>







网友评论文明上网理性发言已有0人参与
发表评论: