- 精品下载 | 实用查询 | 词典查询 | 桌面壁纸 | 网址 | 笑话 | FLASH频道 | 天气文章资讯 | 站长工具 | 证件办理 | 闪字生成 | 广告代码 | 在线手册 | 有问必答
您现在的位置: 蓝派网 >> 文章中心 >> 网络编程 >> ASP >> 正文
站内文章搜索:           

面向对象的asp编程之八---服务器端函数

作者:佚名    文章来源:网络转载    更新时间 :2005-11-26 1:24:35

<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

[1] [2] [3] [4] 下一页


发表评论】【打印此文】【关闭窗口】【点击数:
★好玩的休闲小游戏★
网友评论:
数据载入中,请稍后……