清流:

<div style="clear:both"></div>

获取img的路径到TextBox3内;

 

//获取展示的头像的集合
var
_heads = document.getElementsByClassName("heads_item"); for (var i = 0; i < _heads.length; i++) { _heads[i].onclick = function () { for (var j = 0; j < _heads.length; j++) { _heads[j].style.backgroundColor = ""; } this.style.backgroundColor = 'red';
//获取点击的img的路径 document.getElementById(
'TextBox3').value = this.getElementsByTagName('img')[0].getAttribute('src'); } }

 

 

 

 

相关文章:

  • 2021-11-04
  • 2021-06-22
  • 2021-12-09
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-01-14
相关资源
相似解决方案