jQuery is an excellent Javascript framework that provides excellent packaging for js and provides many convenient functions. jQuery's packaging of ajax is also excellent.
jQuery can transmit data using the json file transfer protocol (similar to xml, and has a tendency to replace xml), and the website backend code must be used in conjunction with it. PHP uses the json_encode function to encode the returned array data, but this function is only supported by PHP version 5.2 or above.
I found a json operation class from the Internet, and I tested it under PHP4.4.7 version. I also built a function function my_json_encode($phparr) to make the code compatible with PHP5.2 and above.
Sample code (including json class package software) can be downloaded at the following URL: http://www.BkJia.com/uploadfile/2012/0221/20120221090101730.rar
The following is the full code: