CMS*_*CMS 28
您还可以使用应用于锚点的新$.unwrap方法(jQuery 1.4+)contents:
?$('a').contents().unwrap();??
Run Code Online (Sandbox Code Playgroud)
点击这里查看示例.
如果要删除链接并保留文本:
$("a").replaceWith(function(){ return $(this).text() });?
Run Code Online (Sandbox Code Playgroud)
在线演示:http://jsbin.com/aguki/edit
如果您使用的是jQuery 1.4+,CMS会提供更短的答案.
| 归档时间: |
|
| 查看次数: |
5634 次 |
| 最近记录: |