我有一个字符串,其中包含文本和一些<a>标签;我想知道如何从变量中选择一个标签并对其进行循环。我尝试以下,但它没有工作: var text = `some string here with <a href="#link">http:something.com</a> more string and more links also`;
$('a', text).each(function() {
我得到了循环静止无功和替换它值帮助(Select a Tag with a Selector from a Text Variable using jQuery),但只有一个问题是从它的左边,是我怎么能更换新更改的标记瑶池标签文本区域 代码: var length = 30;
var end = '...';
var text = `some string here with <a href=