ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






FUNCTION:  Hex( )

Hex(Number)

The Hex function returns the hexadecimal value of an integer number.

Code:
<% =Hex(123) %>

Output:
7B

You can also use a negative integer number.

Code:
<% =Hex(-123) %>

Output:
FF85

For a number with a decimal point (floating-point), the digits to the right of the decimal point are ignored.

Code:
<% =Hex(123.456) %>

Output:
7B