📄 formatnumber.aspx
字号:
<%
Dim intNum As Integer
Dim decNum As Decimal
intNum = 32001
decNum = 32001.9099
' Decimal Format
Response.Write( intNum.ToString( "d" ) )
' => Displays 32001
' Exponential Format
Response.Write( intNum.ToString( "e" ) )
' => Displays 3.200100e+004
Response.Write( decNum.ToString( "e" ) )
' => Displays 3.200191e+004
' Fixed-Point Format
Response.Write( intNum.ToString( "f" ) )
' => Displays 32001.00
Response.Write( decNum.ToString( "f" ) )
' => Displays 32001.91
' General Format
Response.Write( intNum.ToString( "g" ) )
' => Displays 32001
Response.Write( decNum.ToString( "g" ) )
' => Displays 32001.9099
' Number Format
Response.Write( intNum.ToString( "n" ) )
' => Displays 32,001.00
Response.Write( decNum.ToString( "n" ) )
' => Displays 32,001.91
' HexaDecimal Format
Response.Write( intNum.ToString( "x" ) )
' => Displays 7d01
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -