This is a jquery textarea adaptive width code and an example developed outside China. Many of them will see some blogs and other highly adaptive features, now we provide a jquery-controlled textarea highly adaptive code.
This is a foreign developedJquery textarea adaptive widthCode and examples. In many cases, we will see some blogs and other highly adaptive functions. Now we provide jquery control textarea highly adaptive code.
Introduction
1. This textarea is when you create a new or updated existing calendar as described in Google Calendar;
2. Its height will change the variety for user input;
3. Its scroll bar is deleted, which makes users more friendly. I guess you may like it.
Use Code
1. import the jquery. webpage special effects and textarea. js
<Script language = "webpage effect" 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 tutorial
<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>