我需要为路径传递var'busqueda',如果不是使用var,而是使用文本(如果它工作的话),而是推动变量告诉我那里。Symfony,如何将变量传递给路径?
JavaScript代码在树枝中。
var busqueda = document.getElementById('search_keywords').value;
xmlhttp.open("GET","{{path('searchCorreos', {'page': thisPage, 'search': busqueda })}}",true);
xmlhttp.send();
现在我有另一个问题,我已经把这个代码放在一个keyup中,做了xmlhttp.send()之后;不要输入更多。你知道它可以吗? – user3139428