中国最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2

vbscript教程

VB 教程

VB 函数

VBScript CByte 函数

阅读 (2123)

VBScript CByte 函数


VBScript 参考手册 完整的 VBScript 参考手册

CByte 函数把表达式转换为字节(Byte)类型。

表达式必须是介于 0 和 255 之间的数字。

语法

CByte(expression)

参数 描述
expression 必需。任何有效的表达式。

实例

实例

<script type="text/vbscript">

document.write(CByte(0) & "<br />")
document.write(CByte(56.8) & "<br />")
document.write(CByte(123.2) & "<br />")
document.write(CByte(255) & "<br />")

</script>

以上实例输出结果:

0
57
123
255

尝试一下 »

VBScript 参考手册 完整的 VBScript 参考手册
关闭
程序员人生