title: How to clear input field with ajax
body: <p>How can I reset (clear) my input field on success?</p>
  
  <pre><code>&lt;input id="tagtitle" class="form-control" name="tagtitle" type="text"&gt;
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>$('#tagtitle').empty();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>document.getElementById("tagtitle").reset();
  </code></pre>
  
  <p>none of them works.</p>
  
  <h1>Screen capture</h1>
  
  <p><em>this site doesn't allow to upload videos so i had to use this way or link you to another website.</em>
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div style="width:100%;height:0px;position:relative;padding-bottom:72.283%;"&gt;&lt;iframe src="https://streamable.com/s/avie6/njsnuh" frameborder="0" width="100%" height="100%" allowfullscreen style="width:100%;height:100%;position:absolute;left:0px;top:0px;overflow:hidden;"&gt;&lt;/iframe&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>