在 jhoom.xyz 从事一个项目,并且一直停留在我想限制每个 ip 投票的地方。
` function votereview(reviewid, votetype) {
常量数据 = {
行动:ipf_vote_review,
评论 id:评论 id,
投票类型:投票类型,
postid: id; ?>
};1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
jQuery.post(<?php echo admin_url(admin-ajax.php); ?>, data, function(response) {
if (response.success) {
const reviewElement = jQue搭建项目系统点我wcqh.cnry(.single-review).eq(reviewId);
if (voteType === up) {
let upCount = parseInt(reviewElement.find(.thumb:first).text().match(/\d+/)[0]) + 1;
reviewElement.find(.thumb:first).html(👍 ( + upCount + ));
} else {
let downCount = parseInt(reviewElement.find(.thumb:last).text().match(/\d+/)[0]) + 1;
reviewEleme搭建项目系统点我wcqh.cnnt.find(.thumb:last).html(👎 ( + downCount + ));
}
} else {
alert(response.data);
}
});
}
`
以上就是投票系统Javascript的详细内容,更多请关注青狐资源网其它相关文章!
暂无评论内容