|
|
When You will write anything on textarea. It will auto height expand. |
<style>
textarea {
resize: none;
overflow: hidden;
min-height: 50px;
max-height: 100px;
}
</style><script>
function auto_grow(element) {
element.style.height = "5px";
element.style.height = (element.scrollHeight) + "px";
}
</script><script>
function auto_grow(element) {
element.style.height = "5px";
element.style.height = (element.scrollHeight) + "px";
}
</script>
<style>
textarea {
resize: none;
overflow: hidden;
min-height: 50px;
max-height: 100px;
}
</style>
<textarea oninput="auto_grow(this)">
</textarea>
Category: | Web Tutorial |
Sub Category: | HTML Form Tutorial |
Uploaded by: | Admin |