【发布时间】:2015-08-18 03:35:43
【问题描述】:
我使用了带有一个参数月份的 ajax url,这是我从选项框中选择的
$.ajax({
url: baseUri + 'attendancelist/search/attsearch/month/' + month ,
type: 'GET'
...
});
所以我想在我的 attsearchAction() 中调用该参数 所以我这样编码
public function attsearchAction() {
$month = $this->request->get('month'); //current testing framework is phalcon
//$month = $this->_request->getParam('month'); //zend framework is ok by getParam
var_dump($month);exit; //null
}
但它只显示空?怎么解决>>
【问题讨论】:
-
您是否存储了 Ajax 中使用的变量月份?
-
我按 id 存储变量 ... //var month = document.getElementById('month').value;
标签: javascript php jquery ajax phalcon