我无法使用主干js前端restapi后端的post请求向服务器添加数据 [英] i cant add data to server using post request in backbone js frontend restapi backend
本文介绍了我无法使用主干js前端restapi后端的post请求向服务器添加数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在view.js内的代码
myCustomer = new CustomerModel({name:sara,phone:2415,email:dsfg2,user_id :1,有效:0});
myCustomer.save();
和我的错误
无法创建模型客户
my code inside view.js
myCustomer = new CustomerModel({"name":"sara","phone":"2415","email":"dsfg2","user_id":"1","active":"0"});
myCustomer.save();
and my error
Couldn't create model customer
推荐答案
这篇关于我无法使用主干js前端restapi后端的post请求向服务器添加数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文