1
在我的应用程序中,运行在PHP页面中,我希望在选择菜单中的值后执行get请求。该网页的网址是jQuery:使用参数获取请求到同一页面
www.mydomain.it/admin/gest-prenotazioni-piazzola.php
因此,与一个jQuery我想作一个GET请求到同一页面,使其重新加载但一个参数。事实上,在页面的开始,我有:
if (isset($_GET["param1"])) {/*build page with content 1*/}
else if (isset($_GET["param2"])) {/*build page with content 2*/}
所以我试图用
jQuery("#tipologia_piazzola").on('change', function() {
if (this.value == "mensile") {
jQuery.ajax({
url: "",
type: "get",
data:{param1:"mensile"},
success: function(response) {
//Do Something
},
error: function(xhr) {
//Do Something to handle error
}
});
}
});
但这并不做正是我想要的,因为呼叫会在背景和页面完成没有重新加载。任何帮助,将不胜感激。 感谢您的阅读
'@Lory Lory'我希望你能得到解决方案。 –
是的,我认为是。感谢您的帮助! –