<a οnclick=VBScript:document.title="VB:test('X','Y','Z')">文字</a>
Option Compare Text
Private Function Test(S1, S2, S3)
MsgBox S1 & S2 & S3
End Function
Private Sub Form_Load()
WebBrowser1.Navigate "e:\1.htm"
End Sub
Private Sub WebBrowser1_TitleChange(ByVal Text As String)
If Left(Text, 3) = "VB:" Then
Dim s As String, fncName As String, l As Long, args
s = Mid(Text, 4)
s = Replace(s, "(", " ")
s = Replace(s, ")", " ")
l = InStr(s, " ")
fncName = Trim(Left(s, l - 1))
args = Split(Mid(s, l), ",")
For i = 0 To UBound(args)
args(i) = Trim(args(i))
Next
Select Case fncName
Case "test"
Test args(0), args(1), args(2)
End Select
Else
Caption = Text
End If
End Sub