title: Overwriting the CSS parameters value using javascript
body: <p>I want to change the color of the input text box to red on some error. The code which i am given has a css style sheet and it just changes the color of all the textboxes to red if I want to use that style sheet. Is there a way round to sent the textbox border color to red. (Here I am not concerned how I will look for the error just want to know the type of attributes required to set the color of any individual textbox to red)</p>
  
  <p><strong>Here is the code for the text input</strong></p>
  
  <pre><code> &lt;input name="count" 
   type="number" 
   walked="true" 
   autocomplete="off" 
   class="htmlplusinput numberinput novalue" 
   style="width: 24px; " 
   id="htmlplusinputnumberinput19" 
   hasobj="true" 
   novaluedisplay="number"&gt;
  </code></pre>
  
  <p>Here I also want to avoid using id to access this text box since the id's are dynamically changed. (I mean to say that the id htmlplusinputnumberinput19 will be other time htmlplusinputnumberinput789)
  so thats why a better solution will be if I can used some other parameter.</p>
  
  <p>Here is the <strong>CSS style</strong> sheet which is applied to all the input textboxes on the page</p>
  
  <pre><code> input[type="text"], .htmlplusinput {
    border: 1px solid gray;
    }
  </code></pre>