先後端分離模式下前端與後端數據交互

下面舉的例子就是使用jQuery Ajax和Python Flask進行先後端交互時,前端提交表單數據到後端,後端返回JSON數據給前端。前端 前端GET提交表單數據: # GET請求 var data = { "name": "test", "test": "test", }; $.ajax({ type: 'GET', url: /your/url/,
相關文章
相關標籤/搜索