Haha, find a way to simply simulate the Ajax interaction with the server in ExtJS.

Source: Internet
Author: User

has been testing the client's ExtJS, but encountered the server side of the trouble, to build a library, to write JSON, to have the HTTP return value.

Today, a simple method was tested and it was OK to test it.

That is, Python's Simplehttpserver module as a simple Web server, and then, you need to return the value directly to write an HTML.

Specify the startup command for the directory:

Python-m Simplehttpserver

  

If you want to test AJAX requests like the following ExtJS:

<! DOCTYPE html>

You can generate a source.html file under the sibling code directory with the following content:

{users:[{name: ' Qeefee ', age:1}, {name: ' Chengang ', age:18}, {name: ' Sky ', age:31}, {name: ' CK ', age:65}, {name: ' GK ', age : +}, {name: ' Bone ', age:15}, {name: ' Tom ', age:26}]}

The effect is as follows: Get it done!! :)

Haha, find a way to simply simulate the Ajax interaction with the server in ExtJS.

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.