Textarea rows Property - Change the height of a text area using the style.height property: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Textarea

Description

Textarea rows Property - Change the height of a text area using the style.height property:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<textarea id="myTextarea">
new value/*  w ww .j  a  v  a 2 s. co m*/
</textarea>

<button type="button" onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("myTextarea").style.height = "250px";
}
</script>

</body>
</html>

Related Tutorials