Need to update field value in HTML using span ID
<p>I have HTML java code below...</p>

<pre><code>&lt;span id="total"&gt;
   &lt;fmt:formatNumber value='${totalValue}' type="currency" maxFractionDigits="2"                         minFractionDigits="2"/&gt;
&lt;/span&gt;
</code></pre>

<p>and i need to update some value to <code>${totalValue}</code> in javascript method after doing some calculations.</p>

<p>Tried something like <code>$('#total').set('${totalValue}', 'newValue');</code></p>

<p>But not working . please suggest</p>
