我需要删除文档中以"/ {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();
});
Run Code Online (Sandbox Code Playgroud)
我也尝试过$(this).attr("href^='/{tag_'");不工作,有什么想法吗?
谢谢塔拉
$('a').each(function() {
$("a[href^='/{tag_']").remove();
});
Run Code Online (Sandbox Code Playgroud)
这对我有用:http://jsfiddle.net/neuroflux/tKapr/1/
| 归档时间: |
|
| 查看次数: |
9055 次 |
| 最近记录: |