面向对象的asp编程之八---服务器端函数
<Script language="vbscript" runat="server">
'****************************************************************
' Script Compont Object Model
' Design for Active Server Pages
' Copyright 2004 Version 2.0
' Made by 尹曙光
' All Rights Reserved.
' ****************************************************************
'
' 系统常用的一些公用函数
'
'*****************************************************************
'系统公用信息显示
'strMsg:提示信息
'msgType:信息提示类型
'jumpUrl:页面眺转地址
'strCopyRight:版权信息
Function FShowMsg(strMsg,msgType,jumpUrl,strCopyRight)
Response.Write "<Style>"&chr(13)
Response.Write "BODY { margin: 0px 0px 0px 0px;FONT-FAMILY: '宋体','Tahoma', 'MS Shell Dlg';color: #000000;font: 9pt;background-color:#f0f1eb;}"&chr(13)
Response.Write "A{font:normal 12px 宋体;COLOR: #336699; TEXT-DECORATION: none}"&chr(13)
Response.Write "TD{font-family:宋体; font-size: 12px; line-height: 15px;background-color:#f0f1eb;}"&chr(13)
Response.Write ".THead{ background-color: #336699;color:#ffffff;font-weight:bold;}"&chr(13)
Response.Write ".TFoot{ background-color: #336699;COLOR: #ffffff;}"&chr(13)
Response.Write "</style>"&chr(13)
Response.Write "<table height='90%' width='100%'> <tr>"&chr(13)
Response.Write "<td align=center> <table align=center cellpadding=0 cellspacing=0 bordercolor='#336699' bgcolor='#336699' style='width:90%'>"
Response.Write "<tr align=center>"&chr(13)
Response.Write "<td width='100%' height=20 colspan=2 bgcolor='#336699' class='THead' >系统提示信息</t> "&chr(13)
Response.Write "<tr><td width='100%' colspan=2 align='center' bgcolor='#FFFFFF'><br> "&chr(13)
Response.Write strMsg
Select Case cint(msgType)
case 1
Response.Write "[<a href='javascript:window.close();'>关闭窗口</a>]"
Case 2
Response.Write "[<a href='javascript:history.back(-1);'>返回</a>]"
case 3
Response.Write "[<a href='javascript:history.back("&jumpUrl&");'>返回</a>]"
case 4
Response.Write "<meta HTTP-EQUIV=REFRESH CONTENT='3; URL="&jumpUrl&"'>,正在跳转..."
case 5
Response.Write "[<a href='"&jumpUrl&"'>返回</a>]"
End Select
Response.Write "<br><br></td></tr><tr align=center><td width='100%' height=20 colspan=2 class='TFoot'>"&chr(13)
Response.Write strCopyRight
Response.Write "</td> </tr></table></td> </tr> </table>"&chr(13)
Response.End()
End Function
'检查系统错误
'errMsg:出错后的提示信息
Function FIfError(errMsg)
if Err.number>0 then
Response.Write "<br>"
Response.Write errMsg
Response.End
end if
End Function
'显示系统错误信息
Function FSystemError()
if Err.number>0 then
Response.Write "<br>"
Response.Write "错误来源:"&Err.Source&"<br>"
Response.Write "错误代码:"&Err.number&"<br>"
Response.Write "错误说明:"&Err.Description &"<br>"
Response.End
end if
End Function
'判断是不是从form提交过来的
Function FIsPostBack()
if ( UCase(trim(Request.ServerVariables("REQUEST_METHOD")))="POST") then
【相关文章:】
PHP面向对象编程快速入门
面向过程与面向对象的简单比较
PHP数据库操作面向对象的优点
PHP中实现面向对象编程
PHP的面向对象编程
蛙蛙推荐:面向对象编程基础入门(vb.net版)
面向对象的asp编程之九---客户器端函数
面向对象的asp编程之六--用于自动显示RecordSet的表格
面向对象的asp编程之一开篇
面向对象的asp编程之四--一些常用的函数
【发表评论】【打印此文】【关闭窗口】【点击数: 】
