为什么在这段代码中我只将“term”传递给服务器
$.getJSON( "{{route('search.index')}}", {
term: request.term,
type: $('#category_input').attr('data-type')
}, response );
谢谢
最佳答案
$.getJSON( "{{route('search.index')}}", {
term: request.term,
type: $('#category_input').data('type')
}, response );
试试上面的鳕鱼。应该是你没有用data函数访问到的
关于javascript - GETJson 传递两个参数给服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51957419/