卓越飞翔博客卓越飞翔博客

卓越飞翔 - 您值得收藏的技术分享站
技术文章79500本站已运行4414

投票系统Javascript

投票系统javascript

在 jhoom.xyz 从事一个项目,并且一直停留在我想限制每个 ip 投票的地方。
` function votereview(reviewid, votetype) {
常量数据 = {
行动:'ipf_vote_review',
评论 id:评论 id,
投票类型:投票类型,
postid: <?php echo $post->id; ?>
};

        jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', data, function(response) {
            if (response.success) {
                const reviewElement = jQuery('.single-review').eq(reviewId);
                if (voteType === 'up') {
                    let upCount = parseInt(reviewElement.find('.thumb:first').text().match(/d+/)[0]) + 1;
                    reviewElement.find('.thumb:first').html(' 
卓越飞翔博客
上一篇: 带有媒体查询的响应式设计
下一篇: 返回列表
留言与评论(共有 0 条评论)
   
验证码:
隐藏边栏