0
刪除註釋行後,我的格式化輸出非常糟糕。刪除即時換行
我想刪除剩下的換行符。
HTML
<html>
<div class="donottouch">
</div>
</html>
我想這成爲
通緝輸出
<html>
<div class="donottouch">
</div>
</html>
沒有進入其他的div。
代碼我用它來刪除註釋行:
$('> *', $content).contents().each(function() {
if (this.nodeType == 8) {
$(this).remove()
}
});
非常感謝你提前!
最好的問候,
亞歷
爲什麼你想這樣做?你真的沒有獲得/失去任何東西...... – nietonfir