The DIV passed through Ajax has no original effect.

Source: Internet
Author: User
The DIV passed through Ajax has no original effect.

$table = "


< >
















";


$result =array (' table ' = + $table);
echo Json_encode ($result);



This is a picture to enlarge the display effect, I put directly on the page no problem, but through the Ajax pass through to have no effect.
------to solve the idea----------------------
You're going to have to be a little superfluous. If you want to return a string, why must it be converted to JSON? Just return to the line.
1.php

$table = "


< >
















";
Echo $table;

$.get (' 1.php ', function (data) {
$ ("Parent container"). Append (data);
})

You now have no effect on the code is that you take the JSON value when there is a problem or some special characters are escaped even if the page is removed correctly does not parse.
But for you, I suggest you return the string directly.
  • Related Article

    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.