我有一个包含这个字符串的变量:
<DIV><SPAN style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt">[If the confirmation is active the subscriber will receive this email after succesfully confirming. If not, this will be the first and only email he will receive.]</SPAN></DIV>
<p align=center>
<input class=fieldbox10 type = 'button' name = 'button' value = 'Close' onclick = "window.close()">
</p>
如何通过 Javascript(或 jQuery)删除下面的字符串而不用担心空格?
<p align=center>
<input class=fieldbox10 type = 'button' name = 'button' value = 'Close' onclick = "window.close()">
</p>
最佳答案
也许是这个?
$(html).remove('p');
关于javascript - 如何从 HTML 字符串中删除代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2679718/