我有
onclick="document.getElementById('field1').value =
(Math.round((parseFloat(document.getElementById('field2').value,2)*100))/100 +
Math.round((parseFloat(document.getElementById('field3').value,2)*100))/100).toFixed(2);"
字段2和3是文本输入(数值)。如何将字段1的值转换为货币值。实施例
onclick="document.getElementById('field1').value = parseInt(document.getElementById('200.75').value) * parseInt(document.getElementById('11').value);"
并让field1返回$ 2,208.25