Function CreateGUID()
Dim objTypeLib
Set objTypeLib = CreateObject("Scriptlet.TypeLib")
If Err.Number<>0 Then
Response.Write("alert('服务器限制,无法生成GUID');history.back()")
set objTypeLib = Nothing
Response.End
End If
CreateGUID = Mid(objTypeLib.Guid,2,36)
Set objTypeLib = Nothing
End Function
结果:
290491C8-26E8-428D-B55D-31122847492B