enych

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

 

分类:

技术点:

相关文章:

  • 2021-12-30
  • 2022-12-23
  • 2021-12-22
  • 2021-11-01
  • 2021-07-24
  • 2021-11-06
  • 2022-01-22
  • 2021-09-23
猜你喜欢
  • 2021-05-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-07-24
  • 2021-10-13
  • 2021-12-15
相关资源
相似解决方案