Pages

Thursday, February 23, 2012

Function in VBScript language


VB script function is very similar with VB and JavaScript function. The function will call when the form will load into browser window.



<html>
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/vbscript">
Function greeting()
i=hour(time)
If i < 10 Then
  document.write("Good morning!")
Else
  document.write("Have a nice day!")
End If
End Function
</script>
   
</head>
<body onload="greeting()">
    <form id="form1" runat="server">
    <div>
  
    </div>
    </form>
</body>
</html>

1 comment: