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

  • 相关阅读:
    SXOI2016 部分解题报告
    两道FFT的应用题
    [CQOI2012]交换棋子【网络流】【费用流】
    JAVA-SDK-Excel4j使用遇见的问题
    解决Zookeeper出现Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain问题
    maven项目打包时jar中不包含依赖
    CentOS_7中的zookeeper安装
    SpringBoot集成Redis出现WRONGTYPE Operation against a key holding the wrong kind of value错误
    主机访问虚拟机中Redis
    使用SpringS声明式的开启事务
  • 原文地址:https://www.cnblogs.com/unruledboy/p/10450.html
Copyright © 2011-2022 走看看