js面向對象的編程

(function( global, factory ) {
     factory( global );
}
)(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
        var version = "3.1.1";
        function fuckAlert(){
            alert(".....");
        };
    fuckForm =function(options){

        return new fuckForm.fn.init(options);
    }

    fuckForm.fn=fuckForm.prototype={
                fuckform: version,
                fuckAlert: function() {
                    alert("sdasd");
                },
                fuckSet:function(v){
                    debugger;
                    this.default1;
                    alert("fuckSet....");


            }

    };
        fuckForm.getS=function(){
            debugger;
            this;
            alert("version"+version);

            alert("this fuckform"+this.fuckform);

        };


    init = fuckForm.fn.init = function(options) {

            var default1="privatevalue";
            this.getDef=function(){
               return default1;
            }
            this.fuckAlert();
            fuckAlert();
            console.log(version);
            console.log(this.fuckform);
    };

    init.prototype = fuckForm.fn;

    window.fuckForm=fuckForm;


});
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章