先上html代码

      
    
        
      
      
        
              
         
        
        
        
      $('#datetimepicker').datetimepicker({        format: 'yyyy-MM-dd hh:mm:ss'              });     
 $(document).ready(function(){  $("button").click(function(){     var time= $("#w3s").attr("value");    if(time != ""){    $.post("http://1.18.4.22:8000/recv/server",    {       post_time: time     });   }  }); }); 
   

server端 py代码

def server_post(request):                                                                                                             time = request.POST.get('post_time')                                                                                                            if DEBUG:                                                                                                                             print type(time)                                                                                                                  print "%s:%s" % ("time", time)

提交完展现图如下: