Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection

I added the code below to select whole text when user click on input box: <input type="number" onclick="this.setSelectionRange(0, this.value.length)" name="quantity" /> But I receive the er...