文章摘要
这篇文章介绍了名为`Sub MsgBox`的伪代码,描述了一个信息提示窗口的功能。该窗口用于显示提示信息,并根据指定的处理类型(如`Back`返回、`GoUrl`转向、`Close`关闭)执行相应操作。伪代码中定义了提示字符串`str`、处理类型`stype`和转向方向`url`作为参数。主程序首先使用`response.write`输出JavaScript脚本,并调用`alert`函数显示提示信息。根据`stype`的值,脚本会执行以下操作之一:`Back`时调用浏览器历史记录返回,`GoUrl`时修改窗口位置,`Close`时关闭页面。该伪代码结构清晰,展示了信息提示窗口的实现逻辑。
‘************************
‘子程序名:信息提示窗口
‘功能:信息提示,并作返回或者转向
‘参数:
‘str 提示字符串
‘stype 处理类型:Back 返回 GoUrl 转向 Close 关闭
‘url 转向方向
‘************************
Sub MsgBox(str,stype,url)
response.write “<script language=javascript>”
response.write “alert(‘”&str&”‘);”
select case stype
case “Back”
response.write “history.go(-1);”
case “GoUrl”
response.write “window.location='”&url&”‘”
case “Close”
response.write “window.close()”
end select
response.write “</script>”
End Sub
‘************************
‘子程序名:信息提示窗口
‘功能:信息提示,并作返回或者转向
‘参数:
‘str 提示字符串
‘stype 处理类型:Back 返回 GoUrl 转向 Close 关闭
‘url 转向方向
‘************************
Sub MsgBox(str,stype,url)
response.write “<script language=javascript>”
response.write “alert(‘”&str&”‘);”
select case stype
case “Back”
response.write “history.go(-1);”
case “GoUrl”
response.write “window.location='”&url&”‘”
case “Close”
response.write “window.close()”
end select
response.write “</script>”
End Sub
© 版权声明
文章版权归作者所有,未经允许请勿转载。