标签: javascript jquery
jquery中的等价物是什么?
document.body.innerHTML = document.body.innerHTML.replace("text1", "text2");
谢谢
答案 0 :(得分:0)
此
$("body").html(function(){ return $(this).html().replace("text1", "text2"); })
回调函数将返回当前的html替换文本,值将设置为html。