函数嵌套函数传递this值

 <button onclick="demo()(this)">test</button>
    
function demo(){
        return function test(a){
          alert($(a).text())
       }
     }
     demo()

 

posted @ 2017-06-15 11:36  Model-Zachary  阅读(174)  评论(0编辑  收藏  举报