如何从表格单元格中删除html的某些部分
How to remove some part of html from a table cell
我有一个表,其中包含具有以下html内容的列的所有单元格:
<span id='"" + id + "'"" + "class='"asset_value'">" + comments + "</span>" + "<span class='"glyphicon glyphicon-pencil pull-right'"> </span>
如何删除onclick事件上的<span class='"glyphicon glyphicon-pencil pull-right'"> </span>
?
我已经有一个onclick事件函数,其中有行id和列id,其中有这个单元格。
试试这个:
$(this).closest("tr").find("span.glyphicon").remove();
Try,
$(this).parent().find(".glyphicon").remove();
相关文章:
- 可以't让我的if语句处理js中的html表单输入
- 如何设置html元素填充的动画
- 使用JS如何动态更改显示的html文件中的文本背景颜色
- 如何将HTML id分配给元素,以及如何将JavaScript应用于元素
- 如何编写HTML输入的JS内联
- Dojo不解析自定义小部件的模板html中的小部件声明性
- 使用javascript将动态表从一个html页面打印到另一个html页
- 通过javascript重定向html传递php变量
- 如何使Javascript动态html表及其上的事件
- 在chrome.tabs.onCreated之后加载HTML页面
- 如何在vs2002中调试html页面
- 如何使用javascript或html下载PDF格式的填写表单
- 视频HTML没有'无法在Internet Explorer 11上工作
- HTML表单提交时未执行外部函数
- 如何将输入(type=text)从html表单传递到javascript函数
- 使用angular重定向到html页面
- 分析高度属性时出现意外值{{specs.height}}.index.html
- 在html Select中添加搜索
- 多级HTML表单
- 如何将json数据显示为html