是否可以使用JQuery ..删除'& nbsp'? [英] Is it possible to remove '&nbsp' using JQuery..?
问题描述
我连续有两个按钮,它们在两个td中显示,并且在IE中未正确排列,我怀疑在输入之后或输入按钮之前td某处的隐藏空格(& nbsp) ,很遗憾,我无法访问html代码,它是自动生成的.唯一的方法是通过使用jQuery进行控制,我有一个类似jQuery的..
I have two buttons in a row and they are shown in two td's, and its not lined up correctly in IE, I doubt that hidden spaces( ) in the td's somewhere mayby after the input or before the input button, unfortunately I cant access the html code, its automatically generated. The only way is to control by using jQuery I have a jQuery something like this..
$("td:contains(' ')").css("display", "none");
这是在td中消除该& nbsp的正确方法吗??
Is this a right way to get rid of that   in the td ..?
虽然我对JQuery并不了解.
I dont have huge knowledge in JQuery though..
谢谢!
Akhil Paul
Akhil Paul
推荐答案
不,您可以按照以下步骤进行操作:
No, you would do something along these lines:
$("td").html(function (i, html) {
return html.replace(/ /g, '');
});
这篇关于是否可以使用JQuery ..删除'& nbsp'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!