<html> | |
<body> | |
<textarea id="ta" rows=10 cols=40>Sample text</textarea> | |
<script> | |
var v = document.getElementById('ta'); | |
var w = v.offsetWidth; // Force a layout | |
v.rows += 40; // Change the rows again. | |
w = v.offsetWidth; // Force a layout again. | |
</script> | |
</body> | |
</html> | |