jjzjj

salesthree

全部标签

php - 在 Laravel 5.1 中通过 AJAX 将用户输入数据从 View 传递到 Controller

我想使用post方法通过AJAX将下拉列表数据作为表单变量从View发送到Controller。我可以使用get方法和路由参数将下拉列表数据从View发送到Controller。这是我的View代码片段:functiondrawChart(frmyear,toyear){console.log(frmyear);console.log(toyear);varjsonData=$.ajax({url:"get_salesthree/"+frmyear+"/"+toyear+"/",dataType:'json',async:false}).responseText;console.log