zoukankan      html  css  js  c++  java
  • asp.net js 提示信息封装函数

         /// <summary>
            /// js 提示信息 例子如 只提示信息 可以JavaScript("hell world!")
            /// 如果有其他脚本可以JavaScript("alert('hello world!');","document.location='default.aspx';")
            /// </summary>
            /// <param name="actions"></param>
            public void JavaScript(params string[] actions)
            {
                string action = "";
                if (actions.Length > 1)
                {
                    action = string.Format("{0}",  string.Join("",actions));
                }
                else
                {
                    action = string.Format("alert('{0}')", string.Join("", actions));
                }
                ScriptManager.RegisterClientScriptBlock(this, typeof(string), "key" + new Random().Next(1000), string.Format("<script defer=\"defer\">{0}</script>", action), false);
               
            }
  • 相关阅读:
    MT【160】格点
    MT【159】单调有界有极限
    c_str() 函数
    C strstr() 函数
    全面总结:matlab怎么做漂亮的图
    程序员电邮札记
    C编译: 使用gdb调试
    C编译: 动态连接库 (.so文件)
    C编译: makefile基础
    数据科学
  • 原文地址:https://www.cnblogs.com/wanyuan8/p/2469290.html
Copyright © 2011-2022 走看看