jquery 封装

时间:2022-04-16 23:38:49
(function($) {
    var plugName = "teamMingXi";
    var teamMingXi = {
        open : function(type) {
            var basepath=this.basePath;
            var winTitle=this.winTitle;
            var url=this.url;
            var widthVal = "1190px";//定义全局默认宽高
            var heightVal = "300px";
            var paramId = this.paramId;
            if(type=="createWin"){
                createwindow(winTitle,  basepath+url,function(){//保存之后的回调

                },{width:widthVal,height:heightVal});
            }

        }
    };
    teamMingXi.basePath="";
    teamMingXi.paramId="";
    teamMingXi.url="";
    teamMingXi.winTitle="";
    eval("window."+plugName+"=teamMingXi;");

})(jQuery);

方法调用:
 function open11(target){
     teamMingXi.basePath="<%=basePath %>";
     teamMingXi.paramId="402881e3411f39f301412041fb6a0021";
     teamMingXi.open(target);
 }