错误的方法:
mycurrent_row.attachEvent("onclick",function(){document.getElementById('JobCateDetail').value = strArray[x].split("#")[1];});

正确的方法:
(function (x){mycurrent_row.attachEvent("onclick",function(){document.getElementById('JobCateDetail').value = strArray[x].split("#")[1];})})(i)

其中i为设置动态加载函数中的变量

相关文章:

  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-12-04
  • 2022-12-23
  • 2022-02-16
  • 2021-08-25
相关资源
相似解决方案