title: How to clear contents of multiple <input>s by one button
body: <pre><code>&lt;input type="text" placeholder="A" id="A" autocomplete="off"/&gt;
  &lt;input type="text" placeholder="B" id="B" autocomplete="off"/&gt;
  
  &lt;button class="smallbutton" onclick="document.getElementsByTagName('input').value = ''"&gt;Clear&lt;/button&gt;
  </code></pre>
  
  <p>I tried using <code>getElementsByTagName</code> but it doesn't seem to work. What else needs to be done? Or what else can be done besides <code>TagName</code>?</p>