Reset textarea height in javascript
<p>I have a textarea (auto resizing) and I want to clear all of its contents including its height.</p>

<p>So far I've tried:</p>

<pre><code>document.getElementById('textarea').value = '';
</code></pre>

<p>And :</p>

<pre><code>document.getElementById('textarea').attribute('rows','1');
</code></pre>

<p>But both doesn't work.</p>

<p><strong>EDIT :</strong> </p>

<p>I use autosize.js with this :</p>

<pre><code>&lt;textarea id="post" rows="1" title="Write something..." name="posttxt" placeholder="Write something..." role="textbox" autocomplete="off"&gt;&lt;/textarea&gt;
</code></pre>