开发者

need to get a GET variable then send it thru ajax jquery

开发者 https://www.devze.com 2023-01-07 07:47 出处:网络
how can you get a GET variable with javascript? i get it in php from the query string: $idmessage = $_GET[\'id\'];

how can you get a GET variable with javascript? i get it in php from the query string: $idmessage = $_GET['id'];

th开发者_运维技巧en need to send it in $.ajax() jquery, how can i do this? regards


GET variables do not exist on clientside. You need to parse document.location.href. You can make a shortcut with this, I believe, if you're using jQuery as you say.

0

精彩评论

暂无评论...
验证码 换一张
取 消