【发布时间】:2026-01-28 09:40:01
【问题描述】:
我已经安装了 Apache2 并且 Python 工作正常。
我有一个问题。我有两页。
一个是 Python 页面,另一个是带有 JQuery 的 Html 页面 我无法将 Src 粘贴到 google jquery 链接。
谁能告诉我如何让我的 ajax 帖子正常工作。
$(function()
{
alert('Im going to start processing');
$.ajax({
url: "saveList.py",
type: "post",
data: {'param':{"hello":"world"}},
dataType: "application/json",
success : function(response)
{
alert(response);
}
});
});
还有 Python 代码
import sys
import json
def index(req):
result = {'success':'true','message':'The Command Completed Successfully'};
data = sys.stdin.read();
myjson = json.loads(data);
return str(myjson);
【问题讨论】:
-
请不要打开您的问题的多个副本。