函数嵌套函数传递this值 <button onclick="demo()(this)">test</button> function demo(){ return function test(a){ alert($(a).text()) } } demo()