我有安裝的Apache2和Python工作。
雖然我有問題。我有兩頁。
一個Python頁面,另一個Html頁面與JQuery 我couldent pase Src的谷歌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);
請不要打開你的問題的多個副本。 –