$(document).ready(function() {
var text = $(".name")
return $(this).text().replace("★", " ★");
});
这就是我现在所拥有的,但似乎不能工作,为什么?
我以前的代码只能在chrome控制台中运行。
$(".name").text(function() {
return $(this).text().replace("★", " ★");
});
发布于 2018-06-05 00:55:42
我想这更像是你想要的:
$(document).ready(function() {
$(".name").text(function(i, text) {
return text.replace("★", " ★");
});
});
https://stackoverflow.com/questions/50685209
复制相似问题