求解释这段代码,尤其是两个return

var createIframe=(function(){

    var iframe;

    return function(){

        if(!iframe){

            iframe=document.createElement('iframe');

            iframe.style.display='none';

            document.body.appendChild(iframe);

        }

        return iframe;

    }

})();


慕田峪7331174
浏览 561回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript