transpose number to USD
I have
onclick="document.getElementById('field1').value =
(Math.round((parseFloat(document.getElementById('field2').value,2)*100))/100 +
Math.round((parseFloat(document.ge开发者_JAVA技巧tElementById('field3').value,2)*100))/100).toFixed(2);"
Field 2 and 3 are text input (numeric values). How can I transpose the value of field 1 to a currency value. Example
onclick="document.getElementById('field1').value = parseInt(document.getElementById('200.75').value) * parseInt(document.getElementById('11').value);"
and have field1 return $2,208.25
精彩评论