且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Jquery动态加载锚标签

更新时间:2023-12-05 07:55:16

为你的主播分配和识别。



Assign and id to your anchor.

<a id="test" href="#"></a>





然后你可以尝试得到元素



Then you can try to get the element

var anchorHref =


( this )。attr(' href') ;
// 在您的情况下可能是iframe。所以你可能需要调整它或者用jquery来获取它
window .open(url,' _ blank');
(this).attr('href'); //in your case it might the iframe. So you may need to adapt it or get it with jquery as well window.open(url, '_blank');