zoukankan      html  css  js  c++  java
  • 最近写了一些关于.net中js操作的通用函数,希望和大家分享 2

    最近写了一些关于.net中js操作的通用函数,希望和大家分享:

        Public Shared Sub ConfirmAndRedirect(ByRef pgeParenet As System.Web.UI.Page, _
                                             ByVal strMessage As String, _
                                             ByVal strTruePage As String, _
                                             ByVal strFalsePage As String)
            '名称:ConfirmAndRedirect
            '功能:确认,各自转向页面
            '作者:chs
            '创建:2004/5/20
            '修改:2004/5/20
            '参数::
            '      :
            '返回:成功,True,反之,False
            '说明:
            Dim o_strErrMessage As String = "<script language=javascript>if(confirm('"

            o_strErrMessage &= strMessage & "')) this.location.replace('"

            o_strErrMessage &= strTruePage

            o_strErrMessage &= "') else this.location.replace('"

            o_strErrMessage &= strFalsePage

            o_strErrMessage &= "'); </script>"

            pgeParenet.RegisterStartupScript("Message", o_strErrMessage)

        End Sub

        Public Shared Sub ConfirmAndRunScript(ByRef pgeParenet As System.Web.UI.Page, _
                                              ByVal strMessage As String, _
                                              ByVal strTrueScript As String, _
                                              ByVal strFalseScript As String)
            '名称:ConfirmAndRunScript
            '功能:确认,各自执行脚本
            '作者:chs
            '创建:2004/5/20
            '修改:2004/5/20
            '参数::
            '      :
            '返回:成功,True,反之,False
            '说明:
            Dim o_strErrMessage As String = "<script language=javascript>if(confirm('"

            o_strErrMessage &= strMessage & "')) ("

            o_strErrMessage &= strTrueScript

            o_strErrMessage &= ") else ("

            o_strErrMessage &= strFalseScript

            o_strErrMessage &= "); </script>"

            pgeParenet.RegisterStartupScript("Message", o_strErrMessage)

        End Sub

  • 相关阅读:
    北京西格玛大厦微软社区精英 Visual Studio 2010 技术交流会记录
    2010522 Windows Phone 开发者日
    SharePoint Server 2010 RTM 安装过程(图)
    Windows HPC Server 2008 R2 简体中文版 下载
    转:Community Clips 使用指南
    关于CS0016: Could not write to output file ‘c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files… ‘Access is denied.’ 的解决办法
    岗位职责
    PowerPoint 2010 的广播幻灯片功能尝试了一下,可以用。
    Silverlight 4 五
    Windows Server AppFabric 简体中文 下载地址
  • 原文地址:https://www.cnblogs.com/unruledboy/p/10450.html
Copyright © 2011-2022 走看看