Javascript-js and PHP interaction issues

Source: Internet
Author: User
Is the front-end JS send data to PHP processing, and then after processing to accept the return of PHP sent, no Ajax, there are other methods?

Thanks a lot!

Reply content:

Is the front-end JS send data to PHP processing, and then after processing to accept the return of PHP sent, no Ajax, there are other methods?

Thanks a lot!

    1. iframe @ Childe said very clearly.

    2. Flash

IFrame embedded in the form submitted to the PHP page and display the results, JS read the contents of the IFRAME page (note is non-cross-domain case). However, this is not the JS to send data. So the answer is no ...
PS. You give a very good word to the power-. -Estimation is the first question of this keyword ....

After @justjavac greatly reminds: There is also flash can. However, Silverlight since the flash solution can be recommended. Or something JAVA like that, maybe.

XMLHttpRequest scripted HTTP Rhino Book 18 chapter

JSONP. No matter if you step across the domain, it's all done. Non-Ajax

Https://github.com/hprose This can be cross-domain and easy to use.

You can use ANGULARJS (recommended, if you don't want to use Ajax), or use an IFRAME (not recommended), but if you don't want to use the front-end frame, Ajax is handy.

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