VBScript CCur function
CCur function to convert expressions to the currency (Currency) type.
Expression must be a numeric value.
grammar
CCur(expression)
参数 | 描述 |
---|---|
expression | 必需。任何有效的表达式。 |
Examples
Example 1
<script type="text/vbscript">
document.write(CCur(30) & "<br />")
</script>
document.write(CCur(30) & "<br />")
</script>
Examples of the above output:
30
try it"
Example 2
Please note, CCur function rounded to four decimal places:
<script type="text/vbscript">
document.write(CCur(5.9555555555555) & "<br />")
</script>
document.write(CCur(5.9555555555555) & "<br />")
</script>
Examples of the above output:
5.9556
try it"
Complete VBScript Reference