我需要删除所有我的文档中,与“/ {tag_”或“{tag_”jQuery的href属性开始/ {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_'");
也没有工作,任何想法?
感谢塔拉
它为我的jsfiddle - http://jsfiddle.net/yQypx/你不是真的想要做的$(“一[^ HREF =”/{标签_']“)除去();在每个循环内。 – 2011-02-24 09:03:35