zoukankan      html  css  js  c++  java
  • 弹出插件

    var pop =null;
    function ShowIframe(title,contentUrl,width,height)
    {
    pop=new Popup({ contentType:1,isReloadOnClose:false,width,height:height});
    pop.setContent("contentUrl",contentUrl);
    pop.setContent("title",title);
    pop.build();
    pop.show();
    }
    function ShowHtmlString(title,strHtml,width,height)
    {
    pop=new Popup({ contentType:2,isReloadOnClose:false,width,height:height});
    pop.setContent("contentHtml",strHtml);
    pop.setContent("title",title);
    pop.build();
    pop.show();
    }
    function ShowConfirm(title,confirmCon,id,str,width,height)
    {
    var pop=new Popup({ contentType:3,isReloadOnClose:false,width,height:height});
    pop.setContent("title",title);
    pop.setContent("confirmCon",confirmCon);
    pop.setContent("callBack",ShowCallBack);
    pop.setContent("parameter",{id:id,str:str,obj:pop});
    pop.build();
    pop.show();
    }
    function ShowAlert(title,alertCon,width,height)
    {
    pop=new Popup({ contentType:4,isReloadOnClose:false,width,height:height});
    pop.setContent("title",title);
    pop.setContent("alertCon",alertCon);
    pop.build();
    pop.show();
    }
    function ShowCallBack(para)
    {
    var o_pop = para["obj"]
    var obj = document.getElementById(para["id"]);
    o_pop.close();
    obj.click();
    }
    function ClosePop()
    {
    pop.close();
    }

    function __ToShowIframe(title, url, width, height) {
    if (url.indexOf("?") == -1)
    url = url + "?t=" + Math.random();
    else
    url = url + "&t=" + Math.random();
    ShowIframe(title, url, width, height);
    }

    $.formValidator.initConfig({ formid: "form1", onerror: function(msg) { }, onsuccess: function() { } });
    $("#txtUserName").formValidator({ onshow: "请填写用户名", onfocus: "必填 用户名以字母/数字/下划线组成(6~16)" }).regexValidator({ regexp: "^[a-zA-Z0-9\_]{5,20}$", onerror: "用户名必须以字母/数字/下划线组成(6~16)" });

  • 相关阅读:
    较快者等待较慢者发出通知
    Uint and uintptr in golang 非类型安全指针
    C10K C10M 通过DPDK+用户态协议栈来进行内核旁路来提升网络性能
    大型产品团队敏捷发布火车运行指南
    注册中心
    RPA(Robotic Process Automation,机器人流程自动化)
    Actor model
    基于Protobuf共享字段的分包和透传零拷贝技术
    基于etcd实现大规模服务治理应用实战
    删除 服务 注册表
  • 原文地址:https://www.cnblogs.com/lilin123/p/2683699.html
Copyright © 2011-2022 走看看