JS 프로 그래 밍 고급 기술
                                            
 3735 단어  자바 script
                    
Object.protitype.toString.call(value)function Person(name, age, job) {
    if (this instanceof Person) {
        this.name = name;
        this.age = age;
        this.job = job;
    } else {
        return new Person(name, age, job);
    }
}
//                        ,          
function Teacher (name, age, job, salary) {
    // this   Peroson       ,      this      
    Person.call(this, name, age, job); 
    this.salary = salary;
}
//           ,Teacher.prototype = new Person(),    Teacher      Person  function createXHR () {
    if (typeof XMLHttpRequest != 'undefined) {
        createXHR  = function () {
            return new XMLHttpRequest ();
        }
    } else if (typeof ActiveXObject != 'undefined') {
        createXHR = function () {
            if (typeof arguments.callee.activeString != 'string') {
                //...
            }
        }
    } else {
        createXHR  = function () {
            // ...
        }
    }
    return createXHR();
}function bind(fn, context){
    return function() {
        return fn.apply(context, arguments)
    }
}function curry(fn){
    var args = Array.prototype.slice.call(arguments, 1);
    return function () {
        var innerArgs = Array.prototype.slice.call(arguments);
        var finalArgs = args.concat(innerArgs);
        return fn.apply(null, finalArgs)
    }
}Objcect.preventExtensions(obj)   //             
Objcect.isExtensible(obj)         //     bool ,true        ,false     Object.seal(obj)     //          
Object.isSealed    //     bool ,true        ,false     Object.freeze(obj)         //         
Objcet.isForzen(obj)    //     bool ,true        ,false       setInterval()                      ,                                    ,                ,         ,javascript     setInterval ,                          ,       1、         。//     
setTimeout(function () {
    //   
    setTimeout(arguments.callee, interval)
}, interval)function chunk(array, process, context) {
    setTimeout( function() {
        var Item = array.shift();
        process(item)
        if (array.length > 0) {
            setTimeout(arguments.callee, 100)
        }
    }, 100)
}var processor = {
    timeoutId = null,
    //          
    performProcessing: function() {
    //        
},
//          
process: function () {
    clearTimeout(this.timeouId);
    var that = this;
    this.timeoutId = setTimeout(function () {
        that.performProcessing();
    }, 100)
    }
}이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Thymeleaf 의 일반 양식 제출 과 AJAX 제출텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.