-->

WEB资讯

您的当前位置:首页 > 资讯

ajax请求渲染dom,无法获取里面的class解决方法

2019-02-17 18:00:32  来源:admin 点击:553

//搜索选择文件
    var idss = {"name":'0'};
    form.on('select(wenjianjianame)', function(data){
        idss = {"name":data.value};
        jingtai();
    });
    function jingtai(){
        $.post('staticup',idss,function (res) {
            if (res.code == 200) {
                larryms.msg(res.msg);
                var html = '';
                for (var i=0;i<res.data.length;i++)
                {
                    html += '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '名称:'+res.data[i].name+'\n' +
                        '类型:'+res.data[i].type+'\n' +
                        '分类:'+res.data[i].classname+'\n' +
                        '日期:'+res.data[i].modifytime+'\n' +
                        '描述:'+res.data[i].desc+'\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '                                                \n' +
                        '查看详情\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '';
                }
                $('#jintaiditu').html(html);
                $('.larryms-btn-group .layui-btn').on('click', function() {
                    var zfxtype =  $(this).data('type');
                    if(zfxtype == 'look'){
                        var url =  $(this).data('url')+'?name='+ $(this).data('id');
                        var dituIndex =  larryms.open({
                            title: '查看地图',
                            type: 2,
                            area: ['760px', '550px'],
                            content: url,
                            success: function(index, layero) {
                                form.render();
                            }
                        });
                    }
                });
            }else{
                larryms.msg(res.msg);
            }
        });
    }

相关文章更多 >

© 2024版权所有 水水网

电话:171780793