我们开工吧。这是您在 javascript 中的字典:var data = {"name":"nitin raturi"};现在定义一个使用 jquery 发出 post 请求的函数。function send_data(data, callback) {// callback is a function that you should pass to handle your response$.ajax({ type: "POST", url: '/sample-url/', // change this to your url here data: {"data": JSON.stringify(data)}, success: function (response) { callback(response); },});}现在像这样使用 send_data 函数:send_data(data,function(response){//handle your response hereconsole.log(response);})现在您可以像这样在 django 视图中访问您的数据:import json@csrf_exemptdef my_view(request): data = request.POST.get('data') data = json.loads(data) # this will convert your json data to python dictionary name = data.get("name") // Handle your data and return anything you wish return render(request,"index.html",{})