VBScript Round Function
Definition and Usage
The Round function can round numbers.
Syntax
Round(expression[,numdecimalplaces])
Parameters | Description |
---|---|
expression | Required. The expression to be rounded. |
numdecimalplaces | Optional. Specifies the number of decimal places to round to the right of the decimal point. The default is 0. |
Instance
Example 1
dim x x=24.13278 document.write(Round(x))
Output:
24
Example 2
dim x x=24.13278 document.write(Round(x,2))
Output:
24.13