使用jquery按属性删除html元素

Mar*_*tin 2 html javascript jquery

我需要删除一个属性的元素cursor = "pointer"..我需要用html中的javascript来实现这个问题<g cursor="pointer"></g>.我不知道元素在html中有这种形式的原因.

gdo*_*ica 6

你可以用这个:

$('g[cursor="pointer"]').remove();
Run Code Online (Sandbox Code Playgroud)