Latest web development tutorials

VBScript CCur function

VBScript Reference Complete VBScript Reference

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>

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>

Examples of the above output:

5.9556

try it"

VBScript Reference Complete VBScript Reference