ฟังก์ชันVBScript CByte
❮ การอ้างอิง VBScript ที่สมบูรณ์ฟังก์ชัน CByte จะแปลงนิพจน์เป็นประเภทไบต์
นิพจน์ต้องเป็นตัวเลขระหว่าง 0 ถึง 255
ไวยากรณ์
CByte(expression)
Parameter | Description |
---|---|
expression | Required. Any valid expression |
ตัวอย่าง
ตัวอย่าง
<%
response.write(CByte(0) & "<br />")
response.write(CByte(56.8) & "<br />")
response.write(CByte(123.2) & "<br />")
response.write(CByte(255) & "<br />")
%>
ผลลัพธ์ของโค้ดด้านบนจะเป็น:
0
57
123
255
❮ การอ้างอิง VBScript ที่สมบูรณ์