VBScript Oct 函數(shù)
定義和用法
Oct 函數(shù)可返回表示指定數(shù)字八進制值的字符串。
注釋:如果 number 參數(shù)不是整數(shù),則在進行運算前將其四舍五入為最接近的整數(shù)。
語法
Oct(number)
參數(shù) | 描述 |
---|---|
number |
必需的。任何有效的表達式。 如果 number 是:
|
實例
document.write(Oct(3)) document.write(Oct(5)) document.write(Oct(9)) document.write(Oct(10)) document.write(Oct(11)) document.write(Oct(12)) document.write(Oct(400)) document.write(Oct(459)) document.write(Oct(460))
分別輸出:
3 5 11 12 13 14 620 713 714