将以下代码复制粘贴保存为html格式然后预览就可以测试了
<SCRIPT Language="VBScript">
Function btnTest_OnClick()
Dim oTemp
On Error Resume Next
Set oTemp = CreateObject("ADODB.RecordSet")
If Err.Number = 0 Then
Msgbox "支持ADO"
Set oTemp = Nothing
Else
Msgbox "不支持ADO"
Err.Clear
End If
Set oTemp = CreateObject("Scripting.FileSystemObject")
If Err.Number = 0 Then
Msgbox "支持FSO"
Set oTemp = Nothing
Else
Msgbox "不支持FSO"
Err.Clear
End If
Set oTemp = CreateObject("Microsoft.XMLHTTP")
If Err.Number = 0 Then
Msgbox "支持XMLDOM"
Set oTemp = Nothing
Else
Msgbox "不支持XMLDOM"
Err.Clear
End If
End Function
</SCRIPT>
<button name="btnTest">测试组件</button>