繁体   English   中英

如何取消与锚标签的标签的超链接?

[英]how to unbind a hyperlink for a label with the anchor tag?

我在link label内有一个label 我这样做是为了引用其他一些脚本。 我只想删除该labelhyperlink

<a href="/" title="Go to homepage">
<label for="enr_rds_batch_update_Section" id="section">Section</label>
<img alt="Look up Questions" class="image_section_search" src="/assets/Search-icon.gif" title="Lookup Questions">
</a>​

谢谢!!

只需使用jQuery .unwrap()函数即可。

您关心的行是:

$('#section').unwrap();

只要把在一个当你想删除被调用的地方a标签。

小提琴: http : //jsfiddle.net/gromer/6YSQQ/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM