title: How to detect a change in any <td> of table, using javascript?
body: <p>I have a Table whose <code>&lt;td&gt;</code> values varies depending upon the inputs given in form, I am using <a href="http://worrydream.com/Tangle/guide.html" rel="nofollow">Tangle</a> to make a reactive document. Is it posible to detect if the value of <code>&lt;td&gt;</code>changes to any negative number? If so, then it must change its color to red!<br>
  Can Javascripting or html tags itself solve this problem?<br>
  Please help!<br>
  My change will be on profitLossIn1,profitLossIn2,profitLossIn3.<br>
  Here is my html:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Cost&lt;/th&gt;
          &lt;th&gt;Revenue&lt;/th&gt;
          &lt;th&gt;Result Profit/Loss&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;input id='NameInn1' type='text' NAME="NameInn1"&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span class="TKNumberField" data-var="CostIn1"&gt;&lt;/span&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="revenueIn1"&gt; Cost&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="profitLossIn1"&gt; dollars&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;input id='NameInn2' type='text' NAME="NameInn2"&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span class="TKNumberField" data-var="CostIn2"&gt;&lt;/span&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="revenueIn2"&gt; Cost&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="profitLossIn2"&gt; dollars&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;input id='NameInn3' type='text' NAME="NameInn3"&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span class="TKNumberField" data-var="CostIn3"&gt;&lt;/span&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="revenueIn3"&gt; Cost&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="profitLossIn3"&gt; dollars&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b data-var="totalRevenueIn"&gt; dollars&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I am trying this:</p>
  
  <pre><code>var inputs = document.getElementById("profitLossOut1");
  console.log(inputs.value);
  inputs.onchange = function () {
      console.log("Checking IF condition");
      if ((parseInt(this.value)).match("-") == true) this.parentNode.style.background = "red";
  };
  </code></pre>