title: check input length not more than 10
body: <p>Trying to check my value length and make it only to 10 numers.What is my problem?</p>
  
  <pre><code> function checkNumbers(input)
      {   
       if (document.getElementById("answer").value.length == 10)
          {
          input.value = input.value.replace(input.value, '');
          } 
      }
  
      &lt;input type="text" maxlength="10" onkeyup="checkNumbers(isAllowedSymbol(this));checkNumbers(this); "placeholder="Enter data" name="answer" " &gt; &lt;br&gt;
  </code></pre>