I am writing code to clear a particular input field but the button seems to clear it only once.
<div class="input-field col s10">
<i class="material-icons prefix">web</i>
<input type="text" disabled name="pages-input" id="pages-input"></input>
</div>
<div class="col s2">
<input type="button" class="waves-effect waves-light btn red white-text" onClick="document.getElementById('pages-input').setAttribute('value', '');" value="Clear" />
</div>