当前位置:编程学习 > JAVA >>

ajax请求的与页面本身有的数据(页面加载时候存在)的一个区别

点击弹出层,同时隐藏其他弹出层(1、隐藏所有层 2、判断该弹出层是否显示,如果显示就隐藏、如果隐藏就显示)
1、如果是ajax请求的数据,处理需要用
$("#易做图Tip").click(function(e){
        hideAllProp();
        if($('#易做图_cont').is(":visible")){
            $("#易做图_cont").hide();
         }else{       
            $("#易做图_cont").css({top:$(this).offset().top+$(this).height(),left:$(this).offset().left-18}).show();
            $("#易做图_cont ul").html("");
            var data={};
            var dictionaryTable_Name="投诉类型";
            var dictionaryClass_Name="投诉服务";
            data={dictionaryTable_Name:dictionaryTable_Name,dictionaryClass_Name:dictionaryClass_Name};
            $.ajax({
                type:"POST",
                url:getDictionaryAction,
                dataType:"text",
                data:data,
                success:function(data){
                    var jsonArr=data.split("|");
                    var dataArr=eval("("+jsonArr[0]+")");
                    var elem;
                    for(var i=0,j=dataArr.length;i<j;i++){
                        $('<li complaintsType='+dataArr[i].dictionaryItem_ID+'>'+dataArr[i].itemName+'</li>').appendTo("#易做图_cont ul").click(function(){
                            var complaintsType=$(this).attr("complaintsType");
                            hideAllProp();
                            $.ajax({
                                url:complaintRegist,
                                type:"post",
                                dataType:"text",
                                data:{complaintRegisterSource:1,complaintsType:complaintsType},
                                success:function(data){
                                    $(".iframeDiv").show();
                                    showModal();               
                                    $("#success_pro").css({left:$("div.rightCon").offset().left+200,top:$("div.rightCon").offset().top+100}).show();
                                    type="易做图";
                                },
                                error:function(data){   
                                    $(".iframeDiv").show();
                                    showModal();
                                    $("#failure_acc").css({left:$("div.rightCon").offset().left+200,top:$("div.rightCon").offset().top+100}).show();
                                }
                            });
                        });
                    }
                },
    &n

补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,