title: JavaScript: How to change color to only part of the string in an input field?
body: <p>I have an input field where I would like to have the characters turn red after the 10th symbol.</p>
  
  <p>So far I have:</p>
  
  <pre><code>var street_1 = document.getElementById('street_1');
  street_1.style.color = "red";
  </code></pre>
  
  <p>Which changes the color of all the characters. Then I tried using:</p>
  
  <p><code>street_1.value.substring(10,100).style.color = "red";</code> </p>
  
  <p>which of course didn't work since <code>.style</code> as I learned only works for the entire field and not just the value. </p>
  
  <p>Since im completely new to JS I really have no idea how to approach this.</p>