简单的PHP Ajax请求URL

编程入门 行业动态 更新时间:2024-10-26 22:26:46
本文介绍了简单的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

本文发布于:2023-10-12 01:11:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483339.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:简单   PHP   URL   Ajax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!