• 动态加载 弹窗<artDialog3.0.3_>(应用)


            //DynamicLoad File(css,js)
            //Edit By dj_Yang
            function DynamicLoad() {
                var Self = this;
                this.Load = function(type, src) {
                    var objDynamic;
                    if (type == "js" || type == "vbs") {
                        objDynamic = document.createElement("script");
                        objDynamic.src = src;
                        if (type == "js") {
                            objDynamic.type = "text/javascript";
                            objDynamic.language = "javascript";
                        }
                        else {
                            objDynamic.type = "text/vbscript";
                            objDynamic.language = "vbscript";
                        }
                    }
                    else if (type == "css") {
                        objDynamic = document.createElement("link");
                        objDynamic.rel = "stylesheet";
                        objDynamic.type = "text/css";
                        objDynamic.href = src;
                    }
                    document.getElementsByTagName("head")[0].appendChild(objDynamic);
                    objDynamic.onload = objDynamic.onreadystatechange = function() {
                        if (this.readyState && this.readyState == "loading") return;
                        else Self.OnLoaded(src);
                    };
                    objDynamic.onerror = function() {
                        document.getElementsByTagName("head")[0].removeChild(objDynamic);
                        Self.OnFailed(src);
                    };
                };
                this.OnLoaded = function(src) {
                    Self.LoadedCallback(src);
                };
                this.LoadedCallback = function(src) {
                    //do something after succeed loaded
                };
                this.OnFailed = function(src) {
                    Self.FailedCallback(src);
                };
                this.FailedCallback = function(src) {
                    //do something for failed...
                    alert("Error!File:" + src + " load Failed!");
                };
            }
            //Edit By dj_Yang
            (function() {
                //Add a select button for choice

                //Load File
                var oCss1 = new DynamicLoad(),
                oCss2 = new DynamicLoad(),
       oScript = new DynamicLoad();

                oCss1.Load("css","css/art.dialog.css");
                oCss2.Load("css","css/aero.css");

                oScript.Load("js","js/artDialog.min.js");
                //oScript.Load("js", "JS/b.js");
                oScript.LoadedCallback = function() {
                    //alert(str);
                    art.dialog('artDialog崇尚:简单、强大、优雅', function(){alert('yes');});
                };
            })();

  • 相关阅读:
    2019 安装SSDT
    添加删除服务
    POWER BI 报表服务器搭建配置
    解决POWER BI权限控制问题
    asp.net core 发布后显示异常错误信息的方法
    Microsoft SQL Server 查询连接数和关闭连接数
    不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况
    SQL Server在所有表中查找内容(在整个库搜索内容)
    IIS 在.NET MVC网站下创建多个子应用程序,子站访问根目录问题
    博客网址
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/1962475.html
Copyright © 2020-2023  润新知