本文介绍了简单的PHP Ajax请求URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有很多这样的链接... 不同项目的不同链接ID我
I have many links like this... different link id me for different items
<a class="member" href="http//ex/action.php?me=1">link1</a>所以当我单击此按钮时,我想从此处(here.php)导航到action.php 我正在使用ajax来做到这一点.
so when I click this I want to navigate to action.php from here (here.php) I am using ajax to do this.
我是jQuery的新手.我无法理解url参数的用法. here.php至action.php ..
I'm new to jQuery.. I am not able to understand the usage the url parameter.. I tried many posts found here... wanted to the basic way to send the --me-- value from here.php to action.php..
$("a.member").click(function(e) { $.ajax({ type: "GET", url: "action.php?", data: "me=" + me, success: function (data) { alert(data); } }); return false; e.preventDefault(); });推荐答案
尝试一下:
$.ajax({ type: "GET", url: "action.php", data: { me: me }, success: function (data) { alert(data); } });更多推荐
简单的PHP Ajax请求URL
发布评论