Expression calculation using Jquery
<p>I have a table with one span tag with some value and 6 inputs with ID's generated automatically, where value updated from database, that can be changed.</p>

<pre><code>&lt;td&gt;&lt;span id="Day${c.id}"&gt;/*generated automatically*/&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b1-${c.id}" id="b1${c.id}" value="${c.exp?.b1}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b2-${c.id}" id="b2-${c.id}" value="${c.exp?.b2}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b3-${c.id}" id="b3-${c.id}" value="${c.exp?.b3}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b4-${c.id}" id="b4-${c.id}" value="${c.exp?.b4}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b5-${c.id}" id="b5-${c.id}" value="${c.exp?.b5}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input class="inp${c.id}" name="b6-${c.id}" id="b6-${c.id}" value="${c.exp?.b6}" type="text"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;span id="Total${c.id}"&gt;0&lt;/span&gt;&lt;/td&gt;
</code></pre>

<p>I need to realtime calculate onKeyUp expression like this:</p>

<p><code>total = span*(input1*(input2+input3)+input4+input5+input6)</code></p>
