YouTip LogoYouTip

Func Getref

VBScript GetRef Function

Tutorial -- Learning is not just about technology, but also about dreams!

VBScript Tutorial

VB Tutorial VB Usage VB Variables VB Procedures VB Conditionals VB Looping VB Summary VB Examples VB Functions VB Keywords

VBScript Examples

VBScript Keywords

Explore In Depth

Script

Programming

AI Tools, Chatbots, and Virtual Assistants

Web Applications and Online Tools

Scripting Languages

Web Services

Programming Languages

Script

Development Tools

Web Service

VBScript GetRef Function


VBScript Reference Manual Complete VBScript Reference Manual


The GetRef function allows you to connect a VBScript subroutine to a DHTML event on the page.

Syntax

Set object.event=GetRef(procname)
Parameter Description
object Required. The name of the HTML object to which the event is associated.
event Required. The name of the event to bind the function to.
procname Required. The name of the Sub or Function procedure associated with the HTML event.

Example

Example

document.getElementById("myBtn").onclick=GetRef("mySub") Sub mySub() alert("Hello world") End Sub

Try it yourself Β»


VBScript Reference Manual Complete VBScript Reference Manual

← Func InputboxFunc Getobject β†’