How to assign a variable in jquery to PHP. I can't do it for half a day.

Source: Internet
Author: User
$ ('. Sendj '). Click (function () {
var len = $ ("#group span"). Size ();//Gets the number of span tags
var arr = [];
for (var index = 0; index < 5; index++) {//Create a numeric array
Arr[index] = index;
}
var a_inter=[];
$.each (arr, function (i) {//loop to get different ID values
var idvalue = $ ("li.selected"). EQ (i). attr ("id");
if (idvalue! = ") {
A_inter[i]=idvalue;
}
});
D=a_inter.tostring ();//change an array to a string

$.post ("getselect.php", {selectdata:d},function (data) {

});
});
This is the D.


Reply to discussion (solution)

$.post ("getselect.php", {selectdata:d},function (data) .....
You this is submitted

$.post ("getselect.php", {selectdata:d},function (data) {  alert (data);});

getselect.php
 
  

getselect.php need to use

It seems to be the problem of the environment. Toss a day.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.