weiki

<!--<a href="javascript:secondThreadReply(this,1)" onclick="javascript:secondThreadReply(this,1);">回复</a>-->

function secondThreadReply(this,1){

alert(obj);

}

通过href调用js方法,如果传递参数this,js里获取到的并不是a标签对象,而是[object window]对象,

通过onclick事件才能获取到对象自身

分类:

技术点:

相关文章:

  • 2022-01-02
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案