js注册在标签上的点击事件
<div id="trFormatStr_1" onclick="fnTrClick(this)">点击</div>
function fnTrClick(dd){
console.log("window对象",this, "当前对象",$(dd).attr("id"));
}给onclick传递一个this,点击的当前对象,在函数中使用的this是window对象<div id="trFormatStr_1" onclick="fnTrClick(this)">点击</div>
function fnTrClick(dd){
console.log("window对象",this, "当前对象",$(dd).attr("id"));
}给onclick传递一个this,点击的当前对象,在函数中使用的this是window对象