【发布时间】:2016-03-17 14:54:21
【问题描述】:
我正在尝试从我的页面禁用两个使用 Link 标签链接的 CSS 链接。
<div class="ExportedContent">
<link href="//thisismysite/common14/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="//thisismysite/common14/stylesheet_2014.css" type="text/css">
</div>
我有以下代码来删除这个不起作用的链接
<script>
$(document).ready(function(){
$('link[href="https://grants.nih.gov/common14/css/bootstrap.min.css"]').remove();
$('link[href="https://grants.nih.gov/common14/stylesheet_2014.css"]').remove();
});
</script>
到目前为止,这没有任何想法
【问题讨论】:
-
link[src?,你的意思是href -
是的,我现在更正了,但还是不行
-
html和js似乎有不同的href属性值?
标签: javascript jquery html css .net