Ajax obtains the ID data, how to submit the data via post to the post page.

Source: Internet
Author: User
Ajax obtains the ID data, how to submit the data via post to the post page.



such as this, if Id= "ABC" Inside the show is: we and you ...
How can we and you this value by post to the test.php processing page to live this value


Reply to discussion (solution)

Baidu a bit, Ajax POST request a lot of, I generally use jquery ajax is very convenient

$.ajax ({
' type ': ' POST ',
' URL ': " createurl (' CTrain ')?>",
' Cache ': false,
' DataType ': "HTML",
' Data ': {' id ': ID},
' Success ': function (data) {
Data is the result of the return
$ ("#BgDiv"). Show ();
$ ("#show_data"). Append (data);
}
});

jquery Ajax Handy

var ABC = $ ("#abc"). html ();

$.post ("test.php", {VALUE:ABC},
function (data) {
Do
});

var ABC = $ ("#abc"). html ();

$.post ("test.php", {VALUE:ABC},
function (data) {
Do
});

$ (function () {

$ ("#tit"). blur (function () {

$.ajax ({

URL: "check.php",
Type: "GET",
Data: "tit=" +$ ("#tit"). Val (),
Success:function (data)
{
$ ("#chk"). HTML (data);
}

});
})

})

How do I get this data on the test.php page?

Print_r ($_get);

  • 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.