使用jQuery,我怎樣才能刪除我的html body中的一個錨標籤,它也包含一個包裝div,這個包裝div位於我想要移除的錨標籤上方。jquery刪除直接子元素
它就像
<body>
<div id="wrapper">
<a id="not_me" href="#">hi</a>
</div>
<a id="remove_me" href="#">Remove Me</a>
</body>
如果我使用
$("body").find("a:first-child").remove();
將刪除第一個錨標記在我的包裝的div即一個ID爲「not_me」,而我想「remove_me」是除去。
aahhh!再給我一次機會!我只是喜歡那個..:p) – jAndy 2011-01-26 14:57:12
@jAndy:還有幾個給你。 :o) – user113716 2011-01-26 14:58:51