dop20345 2015-03-13 06:29
浏览 26
已采纳

如何用两个参数获取backgrid

I am using backgrid.js for table that I want to fetch backgrid with two parameter.

Now here my code I am trying with one parameter. But I don't know how to send two parameter.

 territories.fetch({ data: { status: 1 }, processData: true, reset: true });
  • 写回答

1条回答 默认 最新

  • dongyuruan2957 2015-03-13 10:43
    关注

    If I understand your question correctly, you want to send multiple options to the data option of ajax. According to Backbone collection fetch documentation,

    jQuery.ajax options can also be passed directly as fetch options, so to fetch a specific page of a paginated collection: Documents.fetch({data: {page: 3}})

    In your case, maybe you can do something like:

    territories.fetch({ 
        data: { 
            status: 1, 
            anotherParam: "another param value" // or whatever you want it to be
        }, 
        processData: true, 
        reset: true 
    });
    

    We can pass as many parameters as we want, just like jQuery.ajax. ( Read about data option )

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口