Fungsi VBScript RGB
Fungsi RGB mengembalikan sejumlah yang mewakili nilai warna RGB.
tatabahasa
RGB(red,green,blue)
参数 | 描述 |
---|---|
red | 必需。介于 0 - 255 之间(且包括)的数字,代表颜色的红色部分。 |
green | 必需。介于 0 - 255 之间(且包括)的数字,代表颜色的绿色部分。 |
blue | 必需。介于 0 - 255 之间(且包括)的数字,代表颜色的蓝色部分。 |
contoh
contoh 1
<script type="text/vbscript">
document.write(rgb(255,0,0))
</script>
document.write(rgb(255,0,0))
</script>
Contoh output di atas:
255
Coba »
contoh 2
<script type="text/vbscript">
document.write(rgb(255,30,30))
</script>
document.write(rgb(255,30,30))
</script>
Contoh output di atas:
1974015
Coba »
Lengkap VBScript Referensi