开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜