• js 复杂研究


    
    
    function test_001()
    {
        var t =0;
        return 
        t || out_str("t未定义"),    //1   // 执行1句;在执行2句;
        t||null                //2
    }
     var obj = test_001();
    
    
    
     
    function  out_str(obj)      //定义一个函数
            {
                console.log(t);
            }
            out_str.fn = out_str.prototype ={name:'张三'};  //函数对象 添加属性 fn 和 prototype  他们的值为一个 对象  {name:'张三'}
    var t = out_str.prototype;
            out_str.extend = out_str.fn.extend = function() {};  //为 out_str 添加一个 extend 属性; 为out_str下的 fn 属性添加 一个 extend 
    
    
    
    
    
    var F = function(e) {
            var i = this; // 这个this 就是 这个函数 F 对象 当 执行  var t = new F(e); 的时候
             console.log(this);
    
            console.log(this.abcdeE);  //F.abcdeE={name:"FFFF"};     ; 输出 未定义 
            console.log(this.abcdeF);   //F.prototype.abcdeF = {name:"FFFF"};  // {name: "FFFF"}
    
            i.index = ++d.index,
            i.config = test({}, i.config, d.config, e),    //config为扩展属性 才有定义 否则 直接 F.
    
            //i.config = r.extend({}, i.config, d.config, e),
            i.render()    //执行 扩展函数
        };
    
        //表示扩展函数
        F.prototype.render = function() {console.log("END")} 
        F.prototype.abcdeF = {name:"FFFF"};
        F.abcdeE={name:"FFFF"}; //为对象添加一个属性; 但不在扩展属性内;
        d.abcde={name:"abcde"};
    
    
    d.render = function(e) {
            var t = new F(e); //传递一个对象
            return c.call(t)
        };
    d.render = function(e) {
        var a, b, c, d, e, f, g = arguments[0] || {},   //a =b=c=d=e=f 都是未定义 ;g=传递的第一个参数
    j = !1;    //j=false
  • 相关阅读:
    AcWing 3302. 表达式求值
    AcWing 828. 模拟栈
    六种风格时间显示
    web2.0常用配色.
    CSS浏览器兼容问题详解
    jQuery Cycle Plugin Beginner Demos
    jQuery插件Clipboard Copy(复制)。
    精通jQuery选择器使用
    jQuery插件右下角弹出信息
    CSS关于box(盒模式)的一系列问题
  • 原文地址:https://www.cnblogs.com/enych/p/11530589.html
Copyright © 2020-2023  润新知