我得到的帮助( 选择与使用jQuery文本变量选择一个标签上循环播放静止无功和替换它的值),但只有一个问题是从它的左边,是我怎么能更换新更改的标记瑶池标签文本区域
码:
var length = 30;
var end = '...';
var text = `some string here with <a href="#link">http:something.com</a> more string and more links also`;
$('<div>' + text + '</div>').find('a').each(function() {
var link_value = $(this).html();
$(this).html(link_value.substring(0, length-1)+(link_value.length > length ? end : ''));
// now how can i put $(this).html() back in the text area, which it was found at?
});