• JQuery 的简单练习


    面对闪存太多的情况,想要删除闪存,在"我的"栏目中使用以下脚本:

            setInterval('refreshQuery()',5000); 
    
    function refreshQuery(){
       var str = $(".recycle").attr("onclick");
       
       var ingId = str.substring(str.indexOf("(")+1, str.indexOf(")"));
       console.log(ingId);
       
       $.ajax({
                url: '/ajax/ing/del',
                data: { 'ingId': ingId },
                type: 'post',
                dataType: 'text',
                // contentType: 'application/json; charset=utf-8',
                success: function (data) {
                    if ($("#ing_body_" + ingId).length) {
                        $("#ing_body_" + ingId).css("color", "red");
                        $("#ing_body_" + ingId).html(data);
                        $("#feed_content_" + ingId + " a.recycle").hide();
                    }
                    else {
                        $("#ing_detail_body").css("color", "red");
                        $("#ing_detail_body").html(data);
                    }
                },
                error: function (xhr) {
                }
            });
       
    }
  • 相关阅读:
    redis概要学习
    http协议格式详解
    浅谈mysql
    linux常用命令
    Linux 程序管理
    认识与分析日志文件
    认识与学习bash
    例行任务管理
    软件安装的三大方法
    关于一些感慨
  • 原文地址:https://www.cnblogs.com/zycyc/p/10342320.html
Copyright © 2020-2023  润新知