我需要刪除所有我的文檔中,與「/ {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