我正在尝试使用Ajax制作网页。
例:
文件:.. test.cgi?name =托马斯
发回文字:您叫Thomas!
我使用文本输入和一个按钮。
如何才能一起轻松使用Ajax,Perl和JSON?
它应该如何协同工作,但是又如何?
HTML + Ajax / JavaScript CALL Perl +“JSON-Perl-string”返回至Ajax CONVERT-JSON-> HTML
最佳答案
对于JSON,请尝试CPAN JSON module。
对于使用XMLHttpRequest,我建议从IBM获得这些精彩的教程。
Mastering Ajax, Part 1: Introduction to Ajax
您可能最感兴趣的两篇文章是这两篇:
Mastering Ajax, Part 10: Using JSON for data transfer
Mastering Ajax, Part 11: JSON on the server side
您可以获取整个11部分系列using this search link。