<script language="vbscript">
sub window_onload()
On Error Resume Next
ocx1.SetServer "www.activesoft.cn",5001
'設置AM服務器及端口
ocx1.Login "am_Guest",""
'登錄的用戶賬號即密碼
if err.number <> 0
then
window.location.href = "error.htm"
end if
end sub
Sub ocx1_OnLogined(obj)
if obj = 1
then
ocx1.SetAcsViews "298","",0
'用戶有權限查看的視圖ID,多個用","號隔開
ocx1.SetUserAsViews "298","",0
'用戶所在的視圖ID
ocx1.ShowView 298
'設置當前查看的視圖ID
end if
End Sub
</script>