如何在模型上传递Ajax对象作为参数

时间:2016-06-25 07:23:01

标签: jquery ajax scala playframework play-templates

我有以下Ajax方法,如何在Scala模型文件上传递参数,我已经google了它但没有使用

$('#application').on('change', function(){
    var x = document.getElementById("application");
    var status = x.options[x.selectedIndex].value;
    var y = document.getElementById("clg");
    var clg = y.options[y.selectedIndex].value;
    $.ajax({
        url:"/getApp?application="+status+"&clg="+clg,
        success:function(result){
            $.map(result,function(obj, i){
                **var numbers = obj.values**
                $('#table_for_list').append('@if(models.sample.app.getAll**('+ numbers +')** == 0) { ---- } else { --- }')
                    (OR)
                $('#table_for_list').append('@if(models.sample.app.getAll**(\''+ numbers +'\')** == 0){ ---- } else { --- }')
            });
        }
    });
});

有人可以给我几点来纠正传递参数的语法吗?

0 个答案:

没有答案
相关问题