VBScript CByte 函數
完整的 VBScript 參考手冊
CByte 函數把表達式轉換為字節(Byte)類型。
表達式必須是介于 0 和 255 之間的數字。
語法
參數 | 描述 |
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 參考手冊