나는 이와 같이 html을 가지고 있습니다.이미지가있는 표의 공백을 제거
<td id="foo">
<img src="foo.png" /> <img src="foo.png" /> <img src="foo.png" />
</td>
html로 위의 공백을 포함하고 또한
,
내가 jQuery를 사용하는 것을 제거 할.
어떻게 수행하나요?
이미이 스크립트로 시도했지만 작동하지 않습니다.
$('#foo').text().replace(/ /g,'');
가능성이있는 dup http://stackoverflow.com/questions/1539367/remove-whitespace-and-line-breaks-between-html-elements-using-jquery – elclanrs