var a = {b:function(){console.log(this)},c:console.log(this)};打印a.c
输出Window {external: Object, chrome: Object, document: document, document_saved: 0, GoogleAnalyticsObject: "ga"…}还有`var el = document.getElementById("outside");
el.addEventListener("click", function(){modifyText("four")}, false);`和`<table id="t" onclick="modifyText();">`这里面modifyText()中的this指向有什么异同?
添加回答
举报
0/150
提交
取消