zoukankan      html  css  js  c++  java
  • Anthem后台调用js

    /// <summary>
            /// 在页面中输出javascript脚本
            /// </summary>
            /// <param name="script">要输出的javascript脚本</param>
            public static void ResponseScript(string script)
            {
                if (Anthem.Manager.IsCallBack)
                {
                    Anthem.Manager.AddScriptForClientSideEval(script);
                }
                else
                {
                    Page page = HttpContext.Current.Handler as Page;
                    script = String.Format(@"
    <script type=""text/javascript"">
    window.attachEvent(""onload"", function()
    {{
    {0}
    }});
    </script>", script);
                    page.ClientScript.RegisterClientScriptBlock(page.GetType(), script, script, false);
                }
            }

    AnthemHelper.ResponseScript("CloseThis();");

  • 相关阅读:
    Maven入门
    Windows Java安装
    cdh安装spark遇到的几个BUG
    SQL Server创建存储过程——动态SQL
    IDEA搭建scala开发环境开发spark应用程序
    liunx命令
    java常用 api
    缓存一致性问题
    git 命令
    nginx
  • 原文地址:https://www.cnblogs.com/gaoshuai/p/2826046.html
Copyright © 2011-2022 走看看