我需要删除文档中以"/{tag_"或"{tag_"开头的所有链接。
目前我尝试使用$("a[href^='/{tag_']").remove();
,但它没有起作用。
我之前还尝试过:
$("a").each(function() {
var href = $(this).attr("href");
if(href == '') { // or anything else you want to remove...
$(this).remove();
}
$("a[href^='/{tag_']").remove();
});
我已经尝试过$(this).attr("href^='/{tag_'");
,但也没有起作用。有什么别的想法吗?
谢谢,Tara