VBScript CByte 函数

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>
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
57
123
255
尝试一下 »

点我分享笔记
笔记需要是本篇文章的内容扩展!文章投稿,可点击这里
注册邀请码获取方式
分享笔记前必须登录!
注册邀请码获取方式
-->