> VB语言在线手册 > If...then..elseif 语句
<!DOCTYPE HTML>
<html>
<body>

<script type="text/vbscript">
i=hour(time)
If i = 10 Then
	document.write("Just started...!")
ElseIf i = 11 Then
	document.write("Hungry!")
ElseIf i = 12 Then
	document.write("Ah, lunch-time!")
ElseIf i = 16 Then
	document.write("Time to go home!")
Else
	document.write("Unknown")
End If
</script>

</body>
</html>