Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你可以做:
aTag.onclick = function (e) { location.href = 'gallery-2.html?lectName=' + this.id; };
在您的onclick事件中,this将引用该aTag对象。
onclick
this
aTag