如何使用jQuery将我网站中的所有[span] [/span]替换为<span></span>
我正在找这样的东西。
$('span').text().replaceWith($(this).text().replace(/[span]/, "<span>"))发布于 2012-01-13 15:40:37
试试这个:
$('body').html($('body').html().replace(/\[span\]/g, '<span>').replace(/\[\/span\]/g, '</span>'));https://stackoverflow.com/questions/8847277
复制相似问题