账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    关于bootstrap-table的问题
    22
    0

    table.bootstrapTable({

                url: $.fn.bootstrapTable.defaults.extend.index_url,
                pk: 'id',
                sortName: 'id',
                columns: [
                    [
                        {checkbox: true},
                        {field: 'id', title:'商品编号'},
                        {field: 'fid', title: '主站编号'},
                        {field: 'name', title: __('Name')},
                        {field: 'is_out', title: '商品状态',formatter:function(value,row,index){
                            if(value==1){
                                return '<a style="text-decoration:none;color:#18bc9c" data-id='+row.id+' class="sold_out" href="javascript:void(0);">已上架</a> '
                            }else{
                                // return '<a style="text-decoration:none;color:gray" data-id='+row.id+' class= "sold_up" href="javascript:void(0);">已下架</a>'
                                return '<a href="#" onclick=response()>测试</a>'
                            }
                        }},
                        {field: 'price', title: __('Price'), operate:'BETWEEN'},
                        {field: 'weight', title: __('Weight'), operate:'BETWEEN'},
                        {field: 'goods_image', title: __('Goods_image'), formatter: Table.api.formatter.image},
                        {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate},
                    ]
                ]
            });
             function response(){
                alert('hello world')
            }
            //我明明定义了这个response函数 为什么还会报response未定义的错误 有没有大神帮忙解答一下![图片描述][1]
    
    
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 尐の潴猪 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部