[英]how to unbind a hyperlink for a label with the anchor tag?
我在link
label
内有一个label
。 我这样做是为了引用其他一些脚本。 我只想删除该label
的hyperlink
。
<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.